Skip to content

Commit

Permalink
Update ktlint
Browse files Browse the repository at this point in the history
  • Loading branch information
massivemadness committed Nov 20, 2023
1 parent e09034a commit bec2910
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
16 changes: 13 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ root = true
indent_size = 4
insert_final_newline = false

# noinspection EditorConfigKeyCorrectness
# Ktlint 0.50.0
ktlint_standard_no-wildcard-imports = disabled
# noinspection EditorConfigKeyCorrectness
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled

# Ktlint 1.0.0
ktlint_standard_annotation = disabled
ktlint_standard_statement-wrapping = disabled
ktlint_standard_blank-line-before-declaration = disabled
ktlint_standard_no-empty-first-line-in-class-body = disabled
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_standard_string-template-indent = disabled
ktlint_standard_parameter-list-wrapping = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_function-naming = disabled
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ fun MessageBox(
contentDescription = null,
modifier = Modifier
.padding(
top = 56.dp, // TODO use column instead
top = 56.dp,
start = 8.dp,
bottom = 8.dp,
)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies {
}
}

tasks.register<JavaExec>("ktlint") {
tasks.register<JavaExec>("ktlintCheck") {
group = LifecycleBasePlugin.VERIFICATION_GROUP
description = "Check Kotlin code style."
classpath = ktlint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ internal var ViewPager2.pageOverScrollMode: Int
get() = getChildAt(0).overScrollMode

@RestrictTo(LIBRARY_GROUP)
set(value) { getChildAt(0).overScrollMode = value }
set(value) {
getChildAt(0).overScrollMode = value
}

internal var ViewPager2.pageSwipeDirection: SwipeDirection
@RestrictTo(LIBRARY_GROUP)
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ android.useAndroidX=true
android.enableJetifier=false
android.nonTransitiveRClass=true

kotlin.code.style=official
kapt.incremental.apt=true
kotlin.code.style=official
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ junit = "4.13.2"
junit-ext = "1.1.5"
test-runner = "1.5.2"
test-macrobenchmark = "1.2.1"
ktlint = "0.50.0"
ktlint = "1.0.0"

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
Expand All @@ -37,7 +37,7 @@ plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.
kotlin = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
material = { module = "com.google.android.material:material", version.ref = "material" }
coil = { module = "io.coil-kt:coil", version.ref = "coil" }
ktlint = { module = "com.pinterest:ktlint", version.ref = "ktlint" }
ktlint = { module = "com.pinterest.ktlint:ktlint-cli", version.ref = "ktlint" }

androidx-core = { module = "androidx.core:core-ktx", version.ref = "core" }
androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "activity" }
Expand Down

0 comments on commit bec2910

Please sign in to comment.