diff options
-rw-r--r-- | build.gradle.kts | 15 | ||||
-rw-r--r-- | sw-ui-kt/build.gradle.kts | 3 |
2 files changed, 15 insertions, 3 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")) + } + } + } } diff --git a/sw-ui-kt/build.gradle.kts b/sw-ui-kt/build.gradle.kts index d2467ef7..1108af44 100644 --- a/sw-ui-kt/build.gradle.kts +++ b/sw-ui-kt/build.gradle.kts @@ -44,6 +44,7 @@ kotlin { implementation(npm("core-js", "3.1.4")) implementation(npm("@blueprintjs/core", "3.15.1")) +// implementation(npm("webstomp-client")) } } test { @@ -73,7 +74,7 @@ tasks { val webpack = project.tasks.withType(KotlinWebpack::class).first() into(webpack.destinationDirectory!!) - val bundleFile = webpack.archiveFile.name + val bundleFile = webpack.outputFileName val publicPath = "./" // TODO get public path from webpack config filesMatching("*.html") { |