Use JVM toolchain for buildSrc module.

Before this change buildSrc module was compiled with current user JDK.
For example on CI it is JDK 1.8. But when the user is using JDK
different from 1.8, buildSrc compilation misses remote build cache. This
may lead to full project recomplilation on the user side.
This commit is contained in:
Yahor Berdnikau
2021-09-21 15:45:20 +02:00
committed by Space
parent d3dd9cd078
commit 24d088242c
+6 -5
View File
@@ -91,6 +91,12 @@ repositories {
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
val generateCompilerVersion by tasks.registering(VersionGenerator::class) {
kotlinNativeVersionInResources=true
defaultVersionFileLocation()
@@ -189,11 +195,6 @@ samWithReceiver {
fun Project.`samWithReceiver`(configure: org.jetbrains.kotlin.samWithReceiver.gradle.SamWithReceiverExtension.() -> Unit): Unit =
extensions.configure("samWithReceiver", configure)
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.allWarningsAsErrors = true
kotlinOptions.freeCompilerArgs += listOf(