From ba5ff2b765c1238152899e040ee658e12d50d281 Mon Sep 17 00:00:00 2001 From: Gary Tierney Date: Wed, 22 Aug 2018 23:16:53 +0100 Subject: [PATCH] Fix inclusion of ktlint for check tasks --- build.gradle | 1 - game/build.gradle | 1 + game/plugin-testing/build.gradle | 1 + game/plugin/build.gradle | 1 + gradle/kotlin.gradle | 20 ++++++++------------ 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index d349e536..511dba9f 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,5 @@ allprojects { } apply from: 'gradle/properties.gradle' -apply from: 'gradle/kotlin.gradle' apply from: 'gradle/jacoco.gradle' apply from: 'gradle/wrapper.gradle' \ No newline at end of file diff --git a/game/build.gradle b/game/build.gradle index 53407a74..a5eb72e8 100644 --- a/game/build.gradle +++ b/game/build.gradle @@ -1,5 +1,6 @@ apply plugin: 'application' apply plugin: 'org.jetbrains.kotlin.jvm' +apply from: "$rootDir/gradle/kotlin.gradle" description = 'Apollo Game' mainClassName = 'org.apollo.Server' diff --git a/game/plugin-testing/build.gradle b/game/plugin-testing/build.gradle index 9e26f3b5..ae3a276c 100644 --- a/game/plugin-testing/build.gradle +++ b/game/plugin-testing/build.gradle @@ -1,5 +1,6 @@ apply plugin: 'java-library' apply plugin: 'org.jetbrains.kotlin.jvm' +apply from: "$rootDir/gradle/kotlin.gradle" dependencies { test.useJUnitPlatform() diff --git a/game/plugin/build.gradle b/game/plugin/build.gradle index 90c96c9a..6d254617 100644 --- a/game/plugin/build.gradle +++ b/game/plugin/build.gradle @@ -1,6 +1,7 @@ subprojects { subproj -> if (subproj.buildFile.exists()) { apply plugin: 'apollo-plugin' + apply from: "$rootDir/gradle/kotlin.gradle" test { useJUnitPlatform() diff --git a/gradle/kotlin.gradle b/gradle/kotlin.gradle index e5e7156a..01ae102e 100644 --- a/gradle/kotlin.gradle +++ b/gradle/kotlin.gradle @@ -1,14 +1,10 @@ -gradle.projectsEvaluated { - configure(subprojects.findAll { it.pluginManager.hasPlugin('kotlin') }) { - apply plugin: 'org.jmailen.kotlinter' +apply plugin: 'org.jmailen.kotlinter' - kotlinter { - ignoreFailures = true - indentSize = 4 - continuationIndentSize = 4 - reporters = ['checkstyle', 'plain'] - } - - kotlin { experimental { coroutines 'enable' } } - } +kotlinter { + ignoreFailures = true + indentSize = 4 + continuationIndentSize = 4 + reporters = ['checkstyle', 'plain'] } + +kotlin { experimental { coroutines 'enable' } }