Conditionally apply Kotlin if not using JDK 9
Kotlin does not yet work with JDK 9, so we need to disable the Kotlin plugin if we are using JDK 9.
This commit is contained in:
parent
03133630cb
commit
f092ae567b
18
build.gradle
18
build.gradle
|
|
@ -109,15 +109,17 @@ configure(allprojects) { project ->
|
|||
apply from: "${gradleScriptDir}/ide.gradle"
|
||||
apply from: "${gradleScriptDir}/sniffer.gradle"
|
||||
|
||||
apply plugin: "kotlin"
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check"]
|
||||
if(!JavaVersion.current().java9Compatible) {
|
||||
apply plugin: "kotlin"
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check"]
|
||||
|
||||
}
|
||||
compileTestKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check"]
|
||||
}
|
||||
compileTestKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
kotlinOptions.freeCompilerArgs = ["-Xskip-runtime-version-check"]
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
|
|
|||
Loading…
Reference in New Issue