Karlo Lozovina
10/20/2021, 10:43 PMExperimentalStdlibApi
, and I add it via Gradle plugin that adds -Xopt-in=kotlin.ExperimentalStdlibApi
to kotlinOptions.freeCompilerArgs
. Building with Gradle from the command line shows no errors, but Intellij keeps underlining functions (like buildList
) and saying that I need to add the annotation. Using the latest Kotlin 1.6 preview plugin. Any ideas what to try to fix it?Karlo Lozovina
10/20/2021, 11:05 PMKarlo Lozovina
10/20/2021, 11:20 PMJvmInline
annotations...Karlo Lozovina
10/20/2021, 11:27 PMKarlo Lozovina
10/20/2021, 11:29 PMKarlo Lozovina
10/20/2021, 11:30 PMankushg
10/21/2021, 12:13 AMlanguageSettings
? Maybe the IDE has better support for the gradle DSL instead of compiler args?
I think docs are outdated though: the useExperimentalAnnotation
method is deprecated and replaced with optIn
Jan Skrasek
10/21/2021, 4:33 AMKarlo Lozovina
10/21/2021, 7:05 AMtasks {
compileKotlin {
kotlinOptions.languageVersion = "1.5"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.jvmTarget = "16"
kotlinOptions.freeCompilerArgs = listOf(
"-Xopt-in=kotlin.ExperimentalStdlibApi",
"-Xopt-in=kotlin.time.ExperimentalTime",
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
)
}
}
It's not EAP, I'm using 2021.2.3 ... I'll try to reproduce it later on a minimal example