diff options
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 80d84681..2bc38baa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,10 @@ plugins { - val kotlinVersion = "1.3.50" + val kotlinVersion = "1.3.61" kotlin("js") version kotlinVersion apply false kotlin("jvm") version kotlinVersion apply false kotlin("multiplatform") version kotlinVersion apply false kotlin("plugin.spring") version kotlinVersion apply false - id("org.jlleitschuh.gradle.ktlint") version "7.1.0" apply false + id("org.jlleitschuh.gradle.ktlint") version "9.1.1" apply false } subprojects { @@ -19,4 +19,15 @@ subprojects { tasks.withType<org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile> { kotlinOptions.freeCompilerArgs = listOf("-Xuse-experimental=kotlin.Experimental") } + + afterEvaluate { + if (!project.name.startsWith("sw-ui")) { + // The import ordering expected by ktlint is alphabetical, which doesn't match IDEA's formatter. + // Since it is not configurable, we have to disable the rule. + // https://github.com/pinterest/ktlint/issues/527 + extensions.configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> { + disabledRules.set(setOf("import-ordering")) + } + } + } } |