Migrate repo to use JVM toolchains Gradle feature.

^KT-46972 Fixed
This commit is contained in:
Yahor Berdnikau
2021-06-29 15:42:02 +02:00
committed by Space
parent 08d831934a
commit 7789054547
67 changed files with 424 additions and 723 deletions
+8 -8
View File
@@ -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))
}
}
}