how to set build.gradle for using new experimental...
# language-proposals
h
how to set build.gradle for using new experimental language features of kotlin 2.0?
d
Kotlin:
Copy code
tasks.withType<KotlinCompile>().all { 
    compilerOptions {
        languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0)
    }
}
Groovy:
Copy code
tasks.named('compileKotlin', org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask.class) {
    compilerOptions {
        languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0)
    }
}
h
thanks
d
Also this channel is for discussions about proposals to Kotlin language For such questions it's better to use #k2-early-adopters (for K2 related questions) or #getting-started (for general questions)
h
ok