This has been answered in Slack Slack but I’ll repeat the answer for others here:
This flag hasn’t landed in the compiler yet. You have to use the old
-X
flags for now.
Groovy DSL:
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-XXLanguage:+NewInference"]
}
}
Kotlin DSL:
tasks.withType(KotlinCompile::class)
.forEach {
it.kotlinOptions { freeCompilerArgs = listOf("-Xnew-inference") }
}