diff --git a/CHANGES.md b/CHANGES.md index c007fd1fce..44b6266a75 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ## [Unreleased] ### Changes * **BREAKING** Bump the required Java to `17`. ([#2375](https://github.com/diffplug/spotless/issues/2375), [#2540](https://github.com/diffplug/spotless/pull/2540)) +* Bump default `google-java-format` version to latest `1.24.0` -> `1.28.0`. ([#2345](https://github.com/diffplug/spotless/pull/2345)) ## [3.3.0] - 2025-07-20 ### Added diff --git a/lib/build.gradle b/lib/build.gradle index a993f83e75..15582710d6 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -96,7 +96,7 @@ dependencies { gherkinCompileOnly 'io.cucumber:gherkin-utils:9.2.0' gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.17' // googleJavaFormat - googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.24.0' + googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.28.0' // gson gsonCompileOnly 'com.google.code.gson:gson:2.13.1' // jackson diff --git a/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java b/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java index 5d63952e2c..c4f763685f 100644 --- a/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java +++ b/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java @@ -121,7 +121,7 @@ private static FormatterStep createInternally(String name, String groupArtifact, .addMin(11, "1.8") // we only support google-java-format >= 1.8 due to api changes .addMin(16, "1.10.0") // java 16 requires at least 1.10.0 due to jdk api changes in JavaTokenizer .addMin(21, "1.17.0") // java 21 requires at least 1.17.0 due to https://github.com/google/google-java-format/issues/898 - .add(11, "1.24.0"); // default version + .add(17, "1.28.0"); // default version public static String defaultGroupArtifact() { return MAVEN_COORDINATE; diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index 1058a76663..bdcc8c43f2 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -5,6 +5,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ## [Unreleased] ### Changed * **BREAKING** Bump the required Gradle to `7.3` and required Java to `17`. ([#2375](https://github.com/diffplug/spotless/issues/2375), [#2540](https://github.com/diffplug/spotless/pull/2540)) +* Bump default `google-java-format` version to latest `1.24.0` -> `1.28.0`. ([#2345](https://github.com/diffplug/spotless/pull/2345)) ## [7.2.0] - 2025-07-20 ### Added diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index 751641aed6..5de90f5430 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -5,6 +5,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ## [Unreleased] ### Changes * **BREAKING** Bump the required Java to `17`. ([#2375](https://github.com/diffplug/spotless/issues/2375), [#2540](https://github.com/diffplug/spotless/pull/2540)) +* Bump default `google-java-format` version to latest `1.24.0` -> `1.28.0`. ([#2345](https://github.com/diffplug/spotless/pull/2345)) ## [2.46.0] - 2025-07-20 ### Added