Skip to content

Commit

Permalink
updat Ktlint to support Kotlin 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Jun 30, 2022
1 parent 2a248fd commit 68506c8
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[*.{kt,kts}]
ij_kotlin_imports_layout=*,^
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
2 changes: 1 addition & 1 deletion catalog/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ android {
kotlinter {
reporters = arrayOf("json")
experimentalRules = true
disabledRules = arrayOf("experimental:trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
disabledRules = arrayOf("trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
}

dependencies {
Expand Down
8 changes: 4 additions & 4 deletions generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ java {
kotlinter {
reporters = arrayOf("json")
experimentalRules = true
disabledRules = arrayOf("experimental:trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
disabledRules = arrayOf("trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
}

dependencies {
Expand All @@ -27,16 +27,16 @@ dependencies {
}

tasks.register<JavaExec>("colors") {
mainClass.set("kiwi.orbit.compose.generator.colors.RunnerKt")
mainClass.set("kiwi.orbit.compose.generator.colors.MainKt")
classpath = sourceSets.getByName("main").runtimeClasspath
}

tasks.register<JavaExec>("icons") {
mainClass.set("kiwi.orbit.compose.generator.icons.RunnerKt")
mainClass.set("kiwi.orbit.compose.generator.icons.MainKt")
classpath = sourceSets.getByName("main").runtimeClasspath
}

tasks.register<JavaExec>("illustrations") {
mainClass.set("kiwi.orbit.compose.generator.illustrations.RunnerKt")
mainClass.set("kiwi.orbit.compose.generator.illustrations.MainKt")
classpath = sourceSets.getByName("main").runtimeClasspath
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ square-kotlinPoet = { module = "com.squareup:kotlinpoet", version.ref = "square-
[bundles]

[plugins]
kotlinter = { id = "org.jmailen.kotlinter", version = "3.10.0" }
kotlinter = { id = "org.jmailen.kotlinter", version = "3.11.1" }
paparazzi = { id = "app.cash.paparazzi", version = "1.0.0" }
2 changes: 1 addition & 1 deletion icons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ android {
kotlinter {
reporters = arrayOf("json")
experimentalRules = true
disabledRules = arrayOf("experimental:trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
disabledRules = arrayOf("trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion illustrations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ android {
kotlinter {
reporters = arrayOf("json")
experimentalRules = true
disabledRules = arrayOf("experimental:trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
disabledRules = arrayOf("trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ android {
kotlinter {
reporters = arrayOf("json")
experimentalRules = true
disabledRules = arrayOf("experimental:trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
disabledRules = arrayOf("trailing-comma") // https://github.com/pinterest/ktlint/issues/1367 ?
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ktlint-disable filename

package kiwi.orbit.compose.ui.foundation

import androidx.compose.ui.geometry.Offset
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ktlint-disable filename

package kiwi.orbit.compose.ui.foundation

import androidx.compose.foundation.text.selection.TextSelectionColors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ktlint-disable filename

package kiwi.orbit.compose.ui.layout

import androidx.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ktlint-disable filename

package kiwi.orbit.compose.ui.utils

import androidx.compose.foundation.layout.PaddingValues
Expand Down

0 comments on commit 68506c8

Please sign in to comment.