https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

Matej Drobnič

07/07/2019, 7:24 PM
How to enable
UseExperimental
annotation in multiplatform project? I tried
Copy code
kotlin {
    targets.all {
        compilations.all {
            kotlinOptions {
                freeCompilerArgs += "-Xuse-experimental=kotlin.Experimental"
            }
        }
    }
}
and IntelliJ still warns about missing compiler argument
r

russhwolf

07/07/2019, 7:28 PM
You can do it from sourceSets instead of targets.
Copy code
sourceSets {
        all {
            languageSettings {
                useExperimentalAnnotation('kotlin.Experimental')
            }
        }
}
👍 1
m

Matej Drobnič

07/07/2019, 7:42 PM
thanks
is this described in a documentation somewhere?
How would one stumble upon this?
l

louiscad

07/07/2019, 7:45 PM
m

Matej Drobnič

07/07/2019, 7:49 PM
l

louiscad

07/07/2019, 7:51 PM
You can change that by clicking on Edit page and submitting a PR to improve it 🙂
m

Matej Drobnič

07/07/2019, 7:51 PM
oh right
will do that 😄
r

russhwolf

07/07/2019, 9:14 PM
The building-mpp-with-gradle page tends to be the most up-to-date for this stuff. Lots of little things outdated elsewhere.
2 Views