Skip to content

Commit 87a168b

Browse files
committed
Bump default KtLint 0.48.1 -> 0.48.2
1 parent 6b3ab24 commit 87a168b

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@ public class KtLintStep {
3636
// prevent direct instantiation
3737
private KtLintStep() {}
3838

39-
private static final String DEFAULT_VERSION = "0.48.1";
39+
private static final String DEFAULT_VERSION = "0.48.2";
4040
static final String NAME = "ktlint";
41-
static final String PACKAGE_PRE_0_32 = "com.github.shyiko";
4241
static final String PACKAGE = "com.pinterest";
43-
static final String MAVEN_COORDINATE_PRE_0_32 = PACKAGE_PRE_0_32 + ":ktlint:";
4442
static final String MAVEN_COORDINATE = PACKAGE + ":ktlint:";
4543

4644
public static FormatterStep create(Provisioner provisioner) {
@@ -114,21 +112,14 @@ static final class State implements Serializable {
114112
@Nullable FileSignature editorConfigPath,
115113
Map<String, String> userData,
116114
Map<String, Object> editorConfigOverride) throws IOException {
117-
this.version = version;
118-
119-
String coordinate;
120-
if (BadSemver.version(version) < BadSemver.version(0, 32)) {
121-
coordinate = MAVEN_COORDINATE_PRE_0_32;
122-
} else {
123-
coordinate = MAVEN_COORDINATE;
124-
}
125-
if (BadSemver.version(version) < BadSemver.version(0, 31, 0)) {
126-
throw new IllegalStateException("KtLint versions < 0.31.0 not supported!");
115+
if (BadSemver.version(version) < BadSemver.version(0, 46, 0)) {
116+
throw new IllegalStateException("KtLint versions < 0.46.0 not supported!");
127117
}
118+
this.version = version;
128119
this.useExperimental = useExperimental;
129120
this.userData = new TreeMap<>(userData);
130121
this.editorConfigOverride = new TreeMap<>(editorConfigOverride);
131-
this.jarState = JarState.from(coordinate + version, provisioner);
122+
this.jarState = JarState.from(MAVEN_COORDINATE + version, provisioner);
132123
this.editorConfigPath = editorConfigPath;
133124
this.isScript = isScript;
134125
}

0 commit comments

Comments
 (0)