Set source and target compatibility in buildSrc

If source and target compatibility are not set explicity,
Gradle will assume they are equal to current JVM version.
This may cause unwanted rebuilds, when a build is run on
different JDK versions (it might happen when switching between
CLI and IDE).
This commit is contained in:
Alexey Tsvetkov
2019-07-01 15:22:15 +03:00
parent a7403b7ee7
commit cd641c9047
+5
View File
@@ -112,6 +112,11 @@ 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["build"].dependsOn(":prepare-deps:build")
allprojects {