From 3e7bd582a3965cb6ed3f77ba6b33707af45b01bc Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 25 May 2022 12:41:06 +0100 Subject: [PATCH] Upgrade to Spring Java Format 0.0.33 Closes gh-31166 --- buildSrc/build.gradle | 2 -- buildSrc/config/checkstyle/checkstyle.xml | 9 +++++++++ buildSrc/gradle.properties | 2 +- buildSrc/settings.gradle | 7 ------- .../boot/testsupport/junit/package-info.java | 20 +++++++++++++++++++ src/checkstyle/checkstyle-suppressions.xml | 8 +++++--- 6 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 buildSrc/config/checkstyle/checkstyle.xml create mode 100644 spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/package-info.java diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index c5516567b98..a4cf101356d 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -33,8 +33,6 @@ dependencies { } checkstyle { - def archive = configurations.checkstyle.filter { it.name.startsWith("spring-javaformat-checkstyle")} - config = resources.text.fromArchiveEntry(archive, "io/spring/javaformat/checkstyle/checkstyle.xml") toolVersion = 8.11 } diff --git a/buildSrc/config/checkstyle/checkstyle.xml b/buildSrc/config/checkstyle/checkstyle.xml new file mode 100644 index 00000000000..1ad50d8fcb8 --- /dev/null +++ b/buildSrc/config/checkstyle/checkstyle.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/buildSrc/gradle.properties b/buildSrc/gradle.properties index 6a758322d20..f09112a67b9 100644 --- a/buildSrc/gradle.properties +++ b/buildSrc/gradle.properties @@ -1 +1 @@ -javaFormatVersion=0.0.31 +javaFormatVersion=0.0.33 diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle index b3efa079400..4cdfcbf3bd5 100644 --- a/buildSrc/settings.gradle +++ b/buildSrc/settings.gradle @@ -3,11 +3,4 @@ pluginManagement { mavenCentral() gradlePluginPortal() } - resolutionStrategy { - eachPlugin { - if (requested.id.id == "io.spring.javaformat") { - useModule "io.spring.javaformat:spring-javaformat-gradle-plugin:${requested.version}" - } - } - } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/package-info.java b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/package-info.java new file mode 100644 index 00000000000..eb52274b639 --- /dev/null +++ b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/junit/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2012-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * General support classes for testing with JUnit. + */ +package org.springframework.boot.testsupport.junit; diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml index 16d5f0d188e..a721a91e7c1 100644 --- a/src/checkstyle/checkstyle-suppressions.xml +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -17,14 +17,14 @@ - + - + - + @@ -49,7 +49,9 @@ + +