summaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts27
1 files changed, 13 insertions, 14 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index d1c0fb73..d7972105 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,4 +1,4 @@
-import org.gradle.api.tasks.testing.logging.TestLogEvent.*
+import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
val kotlinVersion = "1.3.72"
@@ -6,14 +6,22 @@ plugins {
kotlin("jvm") version kotlinVersion apply false
kotlin("multiplatform") version kotlinVersion apply false
kotlin("plugin.spring") version kotlinVersion apply false
- id("org.jetbrains.kotlin.plugin.serialization") version kotlinVersion apply false
- id("org.jlleitschuh.gradle.ktlint") version "9.1.1" apply false
+ kotlin("plugin.serialization") version kotlinVersion apply false
+ id("org.jlleitschuh.gradle.ktlint") version "9.3.0"
}
-subprojects {
+allprojects {
repositories {
jcenter()
}
+}
+
+subprojects {
+ apply(plugin = "org.jlleitschuh.gradle.ktlint")
+
+ ktlint {
+ disabledRules.set(setOf("no-wildcard-imports"))
+ }
val compilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
@@ -27,18 +35,9 @@ subprojects {
tasks.withType<AbstractTestTask> {
testLogging {
- events(FAILED, STANDARD_ERROR)
+ events(TestLogEvent.FAILED, TestLogEvent.STANDARD_ERROR)
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showStackTraces = true
}
}
-
- afterEvaluate {
- // 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", "no-wildcard-imports"))
- }
- }
}
bgstack15