From 65f7ae42db91a35bc3fd6ab935ccb695b7a371cd Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Wed, 12 Jan 2022 11:16:11 -0800 Subject: [PATCH 1/7] Bump GJF default `1.12.0` -> `1.13.0` --- .../java/com/diffplug/spotless/java/GoogleJavaFormatStep.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 02ac90f729..c5ef2e576a 100644 --- a/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java +++ b/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2022 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,7 +93,7 @@ public static FormatterStep create(String groupArtifact, String version, String State::createFormat); } - static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "1.7").add(11, "1.12.0"); + static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "1.7").add(11, "1.13.0"); public static String defaultGroupArtifact() { return MAVEN_COORDINATE; From 608c37bc0506c42557e7072b035b3f80873ff209 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Wed, 12 Jan 2022 11:16:28 -0800 Subject: [PATCH 2/7] Bump ktfmt default `0.29` -> `0.30`. --- lib/src/main/java/com/diffplug/spotless/kotlin/KtfmtStep.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/com/diffplug/spotless/kotlin/KtfmtStep.java b/lib/src/main/java/com/diffplug/spotless/kotlin/KtfmtStep.java index 1a1371702f..b3ad0041f6 100644 --- a/lib/src/main/java/com/diffplug/spotless/kotlin/KtfmtStep.java +++ b/lib/src/main/java/com/diffplug/spotless/kotlin/KtfmtStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2022 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ public class KtfmtStep { // prevent direct instantiation private KtfmtStep() {} - private static final String DEFAULT_VERSION = "0.29"; + private static final String DEFAULT_VERSION = "0.30"; static final String NAME = "ktfmt"; static final String PACKAGE = "com.facebook"; static final String MAVEN_COORDINATE = PACKAGE + ":ktfmt:"; From d36ced336ded998c4a069299089d1ab0bd5f7e2e Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Wed, 12 Jan 2022 11:16:43 -0800 Subject: [PATCH 3/7] Bump defaults in readme to match their actual current values. --- plugin-gradle/README.md | 6 +++--- plugin-maven/README.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index 3fa87462d5..9515bb0381 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -328,7 +328,7 @@ spotless { // if you are using build.gradle.kts, instead of 'spotless {' use: ```kotlin spotless { kotlin { - ktfmt('0.15').dropboxStyle() // version and dropbox style are optional + ktfmt('0.30').dropboxStyle() // version and dropbox style are optional ``` @@ -341,7 +341,7 @@ spotless { spotless { kotlin { // version and userData are both optional - ktlint('0.37.2').userData(mapOf('indent_size' to '2', 'continuation_indent_size' to '2')) + ktlint('0.43.2').userData(mapOf('indent_size' to '2', 'continuation_indent_size' to '2')) ``` ### diktat @@ -352,7 +352,7 @@ spotless { spotless { kotlin { // version and configFile are both optional - diktat('0.4.0').configFile("full/path/to/diktat-analysis.yml") + diktat('1.0.1').configFile("full/path/to/diktat-analysis.yml") ``` diff --git a/plugin-maven/README.md b/plugin-maven/README.md index 148a8c7745..bbb2f10792 100644 --- a/plugin-maven/README.md +++ b/plugin-maven/README.md @@ -329,7 +329,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T ```xml - 0.18 + 0.30 ``` @@ -342,7 +342,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T ```xml - 0.37.2 + 0.43.2 ``` @@ -352,7 +352,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T ```xml - 0.4.0 + 1.0.1 full/path/to/diktat-analysis.yml ``` From 124328c030d18150dfa93f551d1da4c0dea1207d Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Thu, 13 Jan 2022 15:19:52 -0800 Subject: [PATCH 4/7] Update changelog. --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index fbcf560c51..0a9b6ff2fc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,9 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ## [Unreleased] ### Changed * Bump CI from Java 15 to 17 ([#1094](https://github.com/diffplug/spotless/pull/1094)). +* Bump default versions of formatters ([#1095](https://github.com/diffplug/spotless/pull/1095)). + * google-java-format `1.12.0` -> `1.13.0` + * ktfmt `0.29` -> `0.30` ## [2.22.0] - 2022-01-13 ### Added From 2fb945179c47890b29ff28a10468ed18c04a946d Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Thu, 13 Jan 2022 16:00:04 -0800 Subject: [PATCH 5/7] Update the plugin changelogs. --- plugin-gradle/CHANGES.md | 4 ++++ plugin-maven/CHANGES.md | 3 +++ 2 files changed, 7 insertions(+) diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index a420cc04ee..4d9d131e82 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -3,6 +3,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`). ## [Unreleased] +### Changed +* Bump default versions of formatters ([#1095](https://github.com/diffplug/spotless/pull/1095)). + * google-java-format `1.12.0` -> `1.13.0` + * ktfmt `0.29` -> `0.30` ## [6.2.0] - 2022-01-13 ### Added diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index 488ab07fa8..c5ca50d936 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -3,6 +3,9 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +* Bump default versions of formatters ([#1095](https://github.com/diffplug/spotless/pull/1095)). + * google-java-format `1.12.0` -> `1.13.0` + * ktfmt `0.29` -> `0.30` ## [2.20.0] - 2022-01-13 ### Added From 6db29dd4f0b2d02e234ed92a849c617a3a06cd8d Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Thu, 13 Jan 2022 17:07:04 -0800 Subject: [PATCH 6/7] Fix something from 15->17 in #1094 spotlessCheck fails on Java 17 unless we add params to gradle.properties, but we removed that in e578a9d2c9a7117d012a8c6e31c5f27f4d3a1600 because it breaks Java 8. The easy fix is to not run spotlessCheck to `test_nomaven`. This was missed in #1094 because buildcache covered it up. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a6582207d..8361076630 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ anchors: - *restore_cache_wrapper - *restore_cache_deps - run: - name: gradlew check + name: gradlew check -x spotlessCheck command: export SPOTLESS_EXCLUDE_MAVEN=true && ./gradlew check --build-cache - store_test_results: path: testlib/build/test-results/test From 4f79418ecb1e9b422daf30281aa8e17a11ac6dc2 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Thu, 13 Jan 2022 19:28:01 -0800 Subject: [PATCH 7/7] Friggin verbose yaml... --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8361076630..8afdc61345 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,7 +35,7 @@ anchors: - *restore_cache_deps - run: name: gradlew check -x spotlessCheck - command: export SPOTLESS_EXCLUDE_MAVEN=true && ./gradlew check --build-cache + command: export SPOTLESS_EXCLUDE_MAVEN=true && ./gradlew check -x spotlessCheck --build-cache - store_test_results: path: testlib/build/test-results/test - store_test_results: