Skip to content

Commit 4b1c0d5

Browse files
committed
Remove the need to have separate spotless config
1 parent aea8904 commit 4b1c0d5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,22 @@ plugins {
1414
alias(libs.plugins.spotless) apply false
1515
}
1616

17-
val ktlintVersion = "1.5.0"
1817

1918
subprojects {
2019
apply(plugin = "com.diffplug.spotless")
2120
extensions.configure<com.diffplug.gradle.spotless.SpotlessExtension> {
2221
kotlin {
2322
target("**/*.kt")
2423
targetExclude("**/build/**/*.kt")
25-
ktlint(ktlintVersion).editorConfigOverride(
24+
ktlint(libs.versions.ktlint.get()).editorConfigOverride(
2625
mapOf(
2726
"android" to "true",
2827
"ktlint_standard_property-naming" to "disabled"
2928
),
3029
)
3130
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
3231
}
33-
format("kts") {
32+
kotlinGradle {
3433
target("**/*.kts")
3534
targetExclude("**/build/**/*.kts")
3635
// Look for the first line that doesn't have a block comment (assumed to be the license)

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ ksp = "2.1.20-1.0.32"
3838
kotlinxCoroutines = "1.10.2"
3939
kotlinxSerialization = "2.1.20"
4040
kotlinxSerializationJson = "1.8.1"
41+
ktlint = "1.5.0"
4142
lifecycleRuntimeKtx = "2.8.7"
4243
lifecycleViewmodelNavigation3 = "1.0.0-SNAPSHOT"
4344
loggingInterceptor = "5.0.0-alpha.14"

0 commit comments

Comments
 (0)