JVM compatibility version extracted to gradle.properties file

This commit is contained in:
Jakub Chrzanowski
2021-07-05 21:58:29 +02:00
committed by Jakub Chrzanowski
parent 2cfe23439b
commit a396820b68
4 changed files with 21 additions and 11 deletions

View File

@@ -66,17 +66,18 @@ detekt {
// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
tasks {
// Set the compatibility versions to 1.8
withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
withType<Detekt> {
jvmTarget = "1.8"
// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = it
}
withType<Detekt> {
jvmTarget = it
}
}
wrapper {