martmists
04/17/2022, 1:37 PMtasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs = listOf("-Xcontext-receivers")
}
tasks.withType<Kotlin2JsCompile> {
kotlinOptions.freeCompilerArgs = listOf("-Xcontext-receivers")
}
tasks.withType<KotlinCompileCommon> {
kotlinOptions.freeCompilerArgs = listOf("-Xcontext-receivers")
}
tasks.withType<KotlinNativeCompile> {
kotlinOptions.freeCompilerArgs = listOf("-Xcontext-receivers")
}
And then inspecting it in File -> Project Settings -> Modules shows it being added to every target except commonMain/commonTestephemient
04/17/2022, 1:46 PMkotlin {
targets.all {
compilations.all {
kotlinOptions.freeCompilerArgs
}
}
}
martmists
04/17/2022, 1:54 PMmartmists
04/17/2022, 1:58 PMTrevor Stone
04/17/2022, 2:20 PMmartmists
04/17/2022, 2:38 PM