Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ 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"
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"
json-simple = "org.json:json:20210307"
Expand Down
2 changes: 2 additions & 0 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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<String> 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);
}
Expand Down
1 change: 1 addition & 0 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading