What is the best way to add compiler args with korge gradle plugin? #1457
-
Hi, I am adding it like this tasks.withType(KotlinCompile::class).all {
kotlinOptions.freeCompilerArgs += listOf("-Xcontext-receivers", "-Xskip-prerelease-check")
} but both options seem to be ignored (I still see |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Maybe that's executeed synchronously at the moment the code is evaluated. And at that point targets might not have been created yet. Maybe a couple of afterEvaluate? Or maybe there is a way like .configureEeach that can be executed when the task type is created even if that happens later? |
Beta Was this translation helpful? Give feedback.
-
tasks.withType(KotlinCompile::class).all {
kotlinOptions.freeCompilerArgs += listOf("-Xcontext-receivers", "-Xskip-prerelease-check")
} should work fine. This was a temporal problem related to using a pre-release kotlin version. |
Beta Was this translation helpful? Give feedback.
should work fine. This was a temporal problem related to using a pre-release kotlin version.