Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
This commit is contained in:
@@ -5,8 +5,13 @@ plugins {
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
jvmTarget = "1.6"
|
||||
javaHome = rootProject.extra["JDK_16"] as String
|
||||
// This module does not apply Kotlin plugin, so we are setting toolchain via
|
||||
// java extension
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(6))
|
||||
}
|
||||
}
|
||||
|
||||
val kotlinVersion: String by rootProject.extra
|
||||
|
||||
@@ -19,15 +24,10 @@ sourceSets {
|
||||
"test" {}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
}
|
||||
|
||||
tasks.named<ProcessResources>("processResources") {
|
||||
val kotlinVersionLocal = kotlinVersion
|
||||
inputs.property("compilerVersion", kotlinVersionLocal)
|
||||
filesMatching("META-INF/compiler.version") {
|
||||
filter<ReplaceTokens>("tokens" to mapOf("snapshot" to kotlinVersionLocal))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user