on kotlin 1.8.0, in a project with mixed kotlin an...
# getting-started
l
on kotlin 1.8.0, in a project with mixed kotlin and java code (converting java project to kotlin), any idea why i have this error : Unrecognized option: -Xuse-k2
s
maybe you use the wrong KotlinCompile? This works for me in my build.gradle.kts:
Copy code
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
    kotlinOptions.useK2 = true
}
there is another
KotlinCompile
class in package
org.jetbrains.kotlin.gradle.dsl
, but that one doesn't work.