Skip to content

Commit 7a1422b

Browse files
committed
Spotless: update for spotless ktlint changes
1 parent bc933e7 commit 7a1422b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/main/java/dev/minco/gradle/Spotless.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,16 @@ static void applySpotlessSettings(DefaultsPluginExtension settings, Project proj
4848
if (it.getClass().getCanonicalName().startsWith("org.jetbrains.kotlin")) {
4949
if (!appliedKotlin[0]) {
5050
appliedKotlin[0] = true;
51-
var map = new HashMap<String, String>();
51+
var map = new HashMap<String, Object>();
5252
map.put("indent_style", "tab");
5353
map.put("indent_size", "unset");
54-
spotless.kotlin(kotlin -> kotlin.ktlint().userData(map));
54+
spotless.kotlin(kotlin -> {
55+
try {
56+
kotlin.ktlint().editorConfigOverride(map);
57+
} catch (IOException e) {
58+
throw new IOError(e);
59+
}
60+
});
5561
}
5662
}
5763
});

0 commit comments

Comments
 (0)