From 68b9559af812b0890705b02ef36ba18cc825aab6 Mon Sep 17 00:00:00 2001 From: joffrey-bion Date: Sun, 5 Jan 2020 12:32:14 +0100 Subject: Ugrade Kotlin and Ktlint --- build.gradle.kts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'build.gradle.kts') 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 { 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 { + disabledRules.set(setOf("import-ordering")) + } + } + } } -- cgit