Skip to content

Commit bccf169

Browse files
committed
Update ktlint configuration to use version from libs.versions.toml
Switched ktlint version to be sourced from the libs.versions.toml file instead of hardcoding it in build.gradle.kts. This change ensures consistency and easier updates in future.
1 parent 41fe44c commit bccf169

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ spotless {
1414
}
1515
kotlin {
1616
target("**/*.kt")
17-
ktlint("1.3.1").setEditorConfigPath("${project.rootDir}/.editorconfig")
17+
ktlint(libs.versions.ktlint.get()).setEditorConfigPath("${project.rootDir}/.editorconfig")
1818
}
1919
kotlinGradle {
20-
ktlint("1.3.1").setEditorConfigPath("${project.rootDir}/.editorconfig")
20+
ktlint(libs.versions.ktlint.get()).setEditorConfigPath("${project.rootDir}/.editorconfig")
2121
}
2222
}
2323

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ gradle-android = "8.5.2"
88
jacoco = "0.8.11"
99
java = "17"
1010
kotlin = "2.0.10"
11+
ktlint = "1.3.1"
1112
mockk = "1.13.12"
1213

1314
[libraries]

0 commit comments

Comments
 (0)