Skip to content

Commit b6e9073

Browse files
committed
Change back to 0.48.0
1 parent b853169 commit b6e9073

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

lib/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ versionCompatibility {
3434
'0.45.2',
3535
'0.46.0',
3636
'0.47.0',
37-
'0.48.1',
37+
'0.48.0',
3838
]
3939
targetSourceSetName = 'ktlint'
4040
}
@@ -91,9 +91,9 @@ dependencies {
9191
compatKtLint0Dot47Dot0CompileOnly 'com.pinterest.ktlint:ktlint-core:0.47.0'
9292
compatKtLint0Dot47Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.47.0'
9393
compatKtLint0Dot47Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.47.0'
94-
compatKtLint0Dot48Dot1CompileOnly 'com.pinterest.ktlint:ktlint-core:0.48.1'
95-
compatKtLint0Dot48Dot1CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.48.1'
96-
compatKtLint0Dot48Dot1CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.48.1'
94+
compatKtLint0Dot48Dot0CompileOnly 'com.pinterest.ktlint:ktlint-core:0.48.0'
95+
compatKtLint0Dot48Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-experimental:0.48.0'
96+
compatKtLint0Dot48Dot0CompileOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.48.0'
9797

9898
String VER_SCALAFMT="3.6.1"
9999
scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:$VER_SCALAFMT"
@@ -105,8 +105,8 @@ dependencies {
105105
flexmarkCompileOnly 'com.vladsch.flexmark:flexmark-all:0.62.2'
106106
}
107107

108-
configurations.named('testCompatKtLint0Dot48Dot1Implementation').configure {
109-
extendsFrom(configurations.testImplementation, configurations.compatKtLint0Dot48Dot1CompileOnly)
108+
configurations.named('testCompatKtLint0Dot48Dot0Implementation').configure {
109+
extendsFrom(configurations.testImplementation, configurations.compatKtLint0Dot48Dot0CompileOnly)
110110
}
111111

112112
// we'll hold the core lib to a high standard
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import kotlin.Unit;
4848
import kotlin.jvm.functions.Function2;
4949

50-
public class KtLintCompat0Dot48Dot1Adapter implements KtLintCompatAdapter {
50+
public class KtLintCompat0Dot48Dot0Adapter implements KtLintCompatAdapter {
5151

5252
private static final List<EditorConfigProperty<?>> DEFAULT_EDITOR_CONFIG_PROPERTIES;
5353

lib/src/ktlint/java/com/diffplug/spotless/glue/ktlint/KtlintFormatterFunc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import com.diffplug.spotless.glue.ktlint.compat.KtLintCompat0Dot45Dot2Adapter;
2828
import com.diffplug.spotless.glue.ktlint.compat.KtLintCompat0Dot46Dot0Adapter;
2929
import com.diffplug.spotless.glue.ktlint.compat.KtLintCompat0Dot47Dot0Adapter;
30-
import com.diffplug.spotless.glue.ktlint.compat.KtLintCompat0Dot48Dot1Adapter;
30+
import com.diffplug.spotless.glue.ktlint.compat.KtLintCompat0Dot48Dot0Adapter;
3131
import com.diffplug.spotless.glue.ktlint.compat.KtLintCompatAdapter;
3232

3333
public class KtlintFormatterFunc implements FormatterFunc.NeedsFile {
@@ -44,7 +44,7 @@ public KtlintFormatterFunc(String version, boolean isScript, boolean useExperime
4444
int minorVersion = Integer.parseInt(version.split("\\.")[1]);
4545
if (minorVersion >= 48) {
4646
// ExperimentalParams lost two constructor arguments, EditorConfigProperty moved to its own class
47-
this.adapter = new KtLintCompat0Dot48Dot1Adapter();
47+
this.adapter = new KtLintCompat0Dot48Dot0Adapter();
4848
} else if (minorVersion == 47) {
4949
// rename RuleSet to RuleProvider
5050
this.adapter = new KtLintCompat0Dot47Dot0Adapter();
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
import org.junit.jupiter.api.Test;
2929
import org.junit.jupiter.api.io.TempDir;
3030

31-
public class KtLintCompat0Dot48Dot1AdapterTest {
31+
public class KtLintCompat0Dot48Dot0AdapterTest {
3232
@Test
3333
public void testDefaults(@TempDir Path path) throws IOException {
34-
KtLintCompat0Dot48Dot1Adapter KtLintCompat0Dot48Dot1Adapter = new KtLintCompat0Dot48Dot1Adapter();
35-
try (InputStream is = KtLintCompat0Dot48Dot1AdapterTest.class.getResourceAsStream("/empty_class_body.kt")) {
34+
KtLintCompat0Dot48Dot0Adapter ktLintCompat0Dot48Dot0Adapter = new KtLintCompat0Dot48Dot0Adapter();
35+
try (InputStream is = KtLintCompat0Dot48Dot0AdapterTest.class.getResourceAsStream("/empty_class_body.kt")) {
3636
Files.copy(is, path.resolve("empty_class_body.kt"));
3737
}
3838
String text = new String(Files.readAllBytes(path.resolve("empty_class_body.kt")), StandardCharsets.UTF_8);
@@ -41,14 +41,14 @@ public void testDefaults(@TempDir Path path) throws IOException {
4141

4242
Map<String, Object> editorConfigOverrideMap = new HashMap<>();
4343

44-
String formatted = KtLintCompat0Dot48Dot1Adapter.format(text, "empty_class_body.kt", false, false, userData, editorConfigOverrideMap);
44+
String formatted = ktLintCompat0Dot48Dot0Adapter.format(text, "empty_class_body.kt", false, false, userData, editorConfigOverrideMap);
4545
assertEquals("class empty_class_body\n", formatted);
4646
}
4747

4848
@Test
4949
public void testEditorConfigCanDisable(@TempDir Path path) throws IOException {
50-
KtLintCompat0Dot48Dot1Adapter KtLintCompat0Dot48Dot1Adapter = new KtLintCompat0Dot48Dot1Adapter();
51-
try (InputStream is = KtLintCompat0Dot48Dot1AdapterTest.class.getResourceAsStream("/fails_no_semicolons.kt")) {
50+
KtLintCompat0Dot48Dot0Adapter ktLintCompat0Dot48Dot0Adapter = new KtLintCompat0Dot48Dot0Adapter();
51+
try (InputStream is = KtLintCompat0Dot48Dot0AdapterTest.class.getResourceAsStream("/fails_no_semicolons.kt")) {
5252
Files.copy(is, path.resolve("fails_no_semicolons.kt"));
5353
}
5454
String text = new String(Files.readAllBytes(path.resolve("fails_no_semicolons.kt")), StandardCharsets.UTF_8);
@@ -59,7 +59,7 @@ public void testEditorConfigCanDisable(@TempDir Path path) throws IOException {
5959
editorConfigOverrideMap.put("indent_style", "tab");
6060
editorConfigOverrideMap.put("ktlint_standard_no-semi", "disabled");
6161

62-
String formatted = KtLintCompat0Dot48Dot1Adapter.format(text, "fails_no_semicolons.kt", false, false, userData, editorConfigOverrideMap);
62+
String formatted = ktLintCompat0Dot48Dot0Adapter.format(text, "fails_no_semicolons.kt", false, false, userData, editorConfigOverrideMap);
6363
assertEquals("class fails_no_semicolons {\n\tval i = 0;\n}\n", formatted);
6464
}
6565
}

0 commit comments

Comments
 (0)