From 8bcea16a8481e95585f047c7ece735d6dd0e77a8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Sep 2026 03:45:43 +0000 Subject: [PATCH 1/3] Update dependency io.cucumber:gherkin-utils to v12 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 87e1c9fec1..153aefc069 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -49,7 +49,7 @@ cool-rdf-formatter = "cool.rdf:cool-rdf-formatter:2.0.1" diktat-runner = "com.saveourtool.diktat:diktat-runner:2.0.0" flexmark-all = "com.vladsch.flexmark:flexmark-all:0.64.8" freshmark = "com.diffplug.freshmark:freshmark:1.3.1" -gherkin-utils = "io.cucumber:gherkin-utils:10.0.0" +gherkin-utils = "io.cucumber:gherkin-utils:12.0.2" google-java-format = "com.google.googlejavaformat:google-java-format:1.36.1" gson = "com.google.code.gson:gson:2.14.0" json-simple = "org.json:json:20210307" From 1733200a5634c5b2a1d6b4ab4d54a1c2f86b143f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 15 Sep 2026 11:46:48 +0800 Subject: [PATCH 2/3] Update changelogs for default formatter version bump (#2979) --- CHANGES.md | 1 + plugin-gradle/CHANGES.md | 1 + plugin-maven/CHANGES.md | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 1053725a3e..178ca6937d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -23,6 +23,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( - Bump default `palantir-java-format` version `2.80.0` -> `2.98.0`. ([#3068](https://github.com/diffplug/spotless/pull/3068)) - Bump default `scalafmt` version `3.8.1` -> `3.11.5`. ([#2173](https://github.com/diffplug/spotless/pull/2173)) - Bump default `google-java-format` version `1.30.0` -> `1.36.1`. ([#3075](https://github.com/diffplug/spotless/pull/3075)) +- Bump default `gherkin-utils` version `10.0.0` -> `12.0.2`. ([#2979](https://github.com/diffplug/spotless/pull/2979)) ### Fixed - `VersionCatalogStep` preserves standalone comments at section boundaries and the end of the file. ([#3048](https://github.com/diffplug/spotless/issues/3048)) diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index 6c8cff0b56..5c22e09990 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -15,6 +15,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( - Bump default `palantir-java-format` version `2.80.0` -> `2.98.0`. ([#3068](https://github.com/diffplug/spotless/pull/3068)) - Bump default `scalafmt` version `3.8.1` -> `3.11.5`. ([#2173](https://github.com/diffplug/spotless/pull/2173)) - Bump default `google-java-format` version `1.30.0` -> `1.36.1`. ([#3075](https://github.com/diffplug/spotless/pull/3075)) +- Bump default `gherkin-utils` version `10.0.0` -> `12.0.2`. ([#2979](https://github.com/diffplug/spotless/pull/2979)) ### Fixed - `versionCatalog()` preserves standalone comments at section boundaries and the end of the file. ([#3048](https://github.com/diffplug/spotless/issues/3048)) diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index f2f939dab7..7009969454 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -15,6 +15,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( - Bump default `palantir-java-format` version `2.80.0` -> `2.98.0`. ([#3068](https://github.com/diffplug/spotless/pull/3068)) - Bump default `scalafmt` version `3.8.1` -> `3.11.5`. ([#2173](https://github.com/diffplug/spotless/pull/2173)) - Bump default `google-java-format` version `1.30.0` -> `1.36.1`. ([#3075](https://github.com/diffplug/spotless/pull/3075)) +- Bump default `gherkin-utils` version `10.0.0` -> `12.0.2`. ([#2979](https://github.com/diffplug/spotless/pull/2979)) ### Fixed - `` preserves standalone comments at section boundaries and the end of the file. ([#3048](https://github.com/diffplug/spotless/issues/3048)) From 1a50272a568a0d6480289c236a1090ddc8ac2f8d Mon Sep 17 00:00:00 2001 From: Goooler Date: Tue, 15 Sep 2026 17:44:30 +0800 Subject: [PATCH 3/3] Support io.cucumber:gherkin-utils 12.x by provisioning cucumber-gherkin --- gradle/libs.versions.toml | 1 + lib/build.gradle.kts | 2 ++ .../com/diffplug/spotless/gherkin/GherkinUtilsStep.java | 7 ++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 153aefc069..350bf73d35 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -49,6 +49,7 @@ cool-rdf-formatter = "cool.rdf:cool-rdf-formatter:2.0.1" diktat-runner = "com.saveourtool.diktat:diktat-runner:2.0.0" flexmark-all = "com.vladsch.flexmark:flexmark-all:0.64.8" freshmark = "com.diffplug.freshmark:freshmark:1.3.1" +cucumber-gherkin = "io.cucumber:gherkin:42.0.0" gherkin-utils = "io.cucumber:gherkin-utils:12.0.2" google-java-format = "com.google.googlejavaformat:google-java-format:1.36.1" gson = "com.google.code.gson:gson:2.14.0" diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index 2992c4a33f..80301f7ef5 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -34,6 +34,7 @@ buildConfig { } forClass("com.diffplug.spotless.gherkin", "GherkinBuildConfig") { buildConfigField("VERSION_GHERKIN_UTILS", libs.gherkin.utils.version) + buildConfigField("VERSION_GHERKIN", libs.cucumber.gherkin.version) } forClass("com.diffplug.spotless.json", "JsonBuildConfig") { buildConfigField("VERSION_JACKSON", libs.jackson.databind.version) @@ -149,6 +150,7 @@ dependencies { "flexmarkCompileOnly"(libs.flexmark.all) // gherkin "gherkinCompileOnly"(libs.gherkin.utils) + "gherkinCompileOnly"(libs.cucumber.gherkin) "gherkinCompileOnly"(libs.slf4j.api) // googleJavaFormat "googleJavaFormatCompileOnly"(pinnedLibs.google.java.format) diff --git a/lib/src/main/java/com/diffplug/spotless/gherkin/GherkinUtilsStep.java b/lib/src/main/java/com/diffplug/spotless/gherkin/GherkinUtilsStep.java index 859671adba..fb30afe1d2 100644 --- a/lib/src/main/java/com/diffplug/spotless/gherkin/GherkinUtilsStep.java +++ b/lib/src/main/java/com/diffplug/spotless/gherkin/GherkinUtilsStep.java @@ -19,6 +19,7 @@ import java.io.Serializable; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import java.util.List; import java.util.Objects; import com.diffplug.spotless.FormatterFunc; @@ -30,6 +31,7 @@ public final class GherkinUtilsStep implements Serializable { @Serial private static final long serialVersionUID = 1L; private static final String MAVEN_COORDINATE = "io.cucumber:gherkin-utils:"; + private static final String GHERKIN_MAVEN_COORDINATE = "io.cucumber:gherkin:"; public static final String NAME = "gherkinUtils"; private final JarState.Promised jarState; @@ -47,8 +49,11 @@ public static String defaultVersion() { public static FormatterStep create(GherkinUtilsConfig gherkinSimpleConfig, String formatterVersion, Provisioner provisioner) { Objects.requireNonNull(provisioner, "provisioner cannot be null"); + List coordinates = List.of( + MAVEN_COORDINATE + formatterVersion, + GHERKIN_MAVEN_COORDINATE + GherkinBuildConfig.VERSION_GHERKIN); return FormatterStep.create(NAME, - new GherkinUtilsStep(JarState.promise(() -> JarState.from(MAVEN_COORDINATE + formatterVersion, provisioner)), gherkinSimpleConfig), + new GherkinUtilsStep(JarState.promise(() -> JarState.from(coordinates, provisioner)), gherkinSimpleConfig), GherkinUtilsStep::equalityState, GherkinUtilsStep.State::toFormatter); }