Update ktlint and spotless

Change-Id: Id203cc2f5ad04366c8db3d301d3580859629ba0d
pull/281/head
Don Turner 3 years ago
parent 9d8914693a
commit a2a65d6d6c

@ -31,7 +31,30 @@ class SpotlessConventionPlugin : Plugin<Project> {
kotlin {
target("**/*.kt")
targetExclude("**/build/**/*.kt")
ktlint(libs.findVersion("ktlint").get().toString()).userData(mapOf("android" to "true"))
ktlint(libs.findVersion("ktlint").get().toString())
.editorConfigOverride(
mapOf(
"ktlint_code_style" to "android",
"ij_kotlin_allow_trailing_comma" to true,
// These rules were introduced in ktlint 0.46.0 and should not be
// enabled without further discussion. They are disabled for now.
// See: https://github.com/pinterest/ktlint/releases/tag/0.46.0
"disabled_rules" to
"filename," +
"annotation,annotation-spacing," +
"argument-list-wrapping," +
"double-colon-spacing," +
"enum-entry-name-case," +
"multiline-if-else," +
"no-empty-first-line-in-method-block," +
"package-name," +
"trailing-comma," +
"spacing-around-angle-brackets," +
"spacing-between-declarations-with-annotations," +
"spacing-between-declarations-with-comments," +
"unary-op-spacing"
)
)
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
}
format("kts") {

@ -37,7 +37,7 @@ kotlinxCoroutines = "1.6.4"
kotlinxDatetime = "0.4.0"
kotlinxSerializationJson = "1.4.0"
ksp = "1.7.10-1.0.6"
ktlint = "0.43.0"
ktlint = "0.46.1"
lint = "30.2.2"
okhttp = "4.10.0"
protobuf = "3.21.5"
@ -46,7 +46,7 @@ retrofit = "2.9.0"
retrofitKotlinxSerializationJson = "0.8.0"
room = "2.4.3"
secrets = "2.0.1"
spotless = "6.7.2"
spotless = "6.10.0"
turbine = "0.8.0"
[libraries]

Loading…
Cancel
Save