What is the best way to add compiler args with korge gradle plugin? #1457
Answered
by
soywiz
BioRyajenka
asked this question in
Q&A
|
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 |
Answered by
soywiz
Apr 23, 2023
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? |
1 reply
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. |
0 replies
Answer selected by
soywiz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
should work fine. This was a temporal problem related to using a pre-release kotlin version.