build.gradle.kts: simpler syntax for configuring KotlinCompile (#63)

This commit is contained in:
Jean-Michel Fayard 2020-12-08 16:54:18 +01:00 committed by GitHub
parent 5b56cbb97e
commit 6d2468914a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,11 +77,9 @@ tasks {
sourceCompatibility = "1.8" sourceCompatibility = "1.8"
targetCompatibility = "1.8" targetCompatibility = "1.8"
} }
listOf("compileKotlin", "compileTestKotlin").forEach { withType<KotlinCompile> {
getByName<KotlinCompile>(it) {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
} }
}
withType<Detekt> { withType<Detekt> {
jvmTarget = "1.8" jvmTarget = "1.8"