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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user