ursus
06/12/2023, 10:04 AMjava {
toolchain { .. }
}
a replacement for this
tasks.withType(JavaCompile).configureEach { task ->
task.sourceCompatibility = JavaVersion.VERSION_17
task.targetCompatibility = JavaVersion.VERSION_17
}
and this
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { task ->
task.kotlinOptions {
jvmTarget = "17"
?mudasar187
06/12/2023, 10:09 AMmudasar187
06/12/2023, 10:10 AMtasks.withType(JavaCompile).configureEach { task ->
task.sourceCompatibility = JavaVersion.VERSION_17
task.targetCompatibility = JavaVersion.VERSION_17
}
with
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
ursus
06/12/2023, 10:11 AMmudasar187
06/12/2023, 10:11 AMjava
to kotlin
if you are using Gradle Kotlin DSLursus
06/12/2023, 10:12 AMCLOVIS
06/12/2023, 10:17 AMursus
06/12/2023, 10:19 AMjava { .. }
syntax, correct?
will it work for android module as well? the sample I posted works only for pure java modulesVampire
06/12/2023, 10:42 AM