Skip to content

Commit

Permalink
Bump default KtLint 0.48.1 -> 0.48.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Jan 26, 2023
1 parent 6b3ab24 commit 87a168b
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ public class KtLintStep {
// prevent direct instantiation
private KtLintStep() {}

private static final String DEFAULT_VERSION = "0.48.1";
private static final String DEFAULT_VERSION = "0.48.2";
static final String NAME = "ktlint";
static final String PACKAGE_PRE_0_32 = "com.github.shyiko";
static final String PACKAGE = "com.pinterest";
static final String MAVEN_COORDINATE_PRE_0_32 = PACKAGE_PRE_0_32 + ":ktlint:";
static final String MAVEN_COORDINATE = PACKAGE + ":ktlint:";

public static FormatterStep create(Provisioner provisioner) {
Expand Down Expand Up @@ -114,21 +112,14 @@ static final class State implements Serializable {
@Nullable FileSignature editorConfigPath,
Map<String, String> userData,
Map<String, Object> editorConfigOverride) throws IOException {
this.version = version;

String coordinate;
if (BadSemver.version(version) < BadSemver.version(0, 32)) {
coordinate = MAVEN_COORDINATE_PRE_0_32;
} else {
coordinate = MAVEN_COORDINATE;
}
if (BadSemver.version(version) < BadSemver.version(0, 31, 0)) {
throw new IllegalStateException("KtLint versions < 0.31.0 not supported!");
if (BadSemver.version(version) < BadSemver.version(0, 46, 0)) {
throw new IllegalStateException("KtLint versions < 0.46.0 not supported!");
}
this.version = version;
this.useExperimental = useExperimental;
this.userData = new TreeMap<>(userData);
this.editorConfigOverride = new TreeMap<>(editorConfigOverride);
this.jarState = JarState.from(coordinate + version, provisioner);
this.jarState = JarState.from(MAVEN_COORDINATE + version, provisioner);
this.editorConfigPath = editorConfigPath;
this.isScript = isScript;
}
Expand Down

0 comments on commit 87a168b

Please sign in to comment.