Fix: Make "cidrPluginsEnabled" Gradle parameter checks consistent

Also add logging.
This commit is contained in:
Dmitriy Dolovov
2019-05-08 14:09:32 +03:00
parent e158875a14
commit ca9bff010b
2 changed files with 9 additions and 2 deletions
+5 -1
View File
@@ -31,8 +31,12 @@ buildscript {
classpath("org.jetbrains.dokka:dokka-gradle-plugin:0.9.17")
// a workaround to add another one buildSrc with Cidr-specific tools to Gradle classpath
val kotlinUltimateBuildSrcDep = "org.jetbrains.kotlin.ultimate:buildSrc:1.0"
if (findProperty("cidrPluginsEnabled")?.toString()?.toBoolean() == true) {
classpath("org.jetbrains.kotlin.ultimate:buildSrc:1.0")
logger.info("Adding buildscript classpath dependency \"$kotlinUltimateBuildSrcDep\" in build.gradle.kts")
classpath(kotlinUltimateBuildSrcDep)
} else {
logger.info("NOT adding buildscript classpath dependency \"$kotlinUltimateBuildSrcDep\" in build.gradle.kts")
}
}
}
+4 -1
View File
@@ -204,8 +204,9 @@ include ":kotlin-build-common",
":kotlin-serialization-unshaded"
def includeCidr = hasProperty("cidrPluginsEnabled") && cidrPluginsEnabled != 'false'
def includeCidr = hasProperty("cidrPluginsEnabled") && Boolean.parseBoolean(cidrPluginsEnabled)
if (includeCidr) {
logger.info("Including :kotlin-ultimate in settings.gradle")
includeBuild "kotlin-ultimate/buildSrc"
include ":kotlin-ultimate:ide:cidr-native",
":kotlin-ultimate:ide:appcode-native",
@@ -213,6 +214,8 @@ if (includeCidr) {
":kotlin-ultimate:prepare:cidr-plugin",
":kotlin-ultimate:prepare:appcode-plugin",
":kotlin-ultimate:prepare:clion-plugin"
} else {
logger.info("NOT including :kotlin-ultimate in settings.gradle")
}
def isTeamcityBuild = hasProperty("teamcity") || System.getenv("TEAMCITY_VERSION") != null