How to enable `UseExperimental` annotation in mult...
# multiplatform
m
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
You can do it from sourceSets instead of targets.
Copy code
sourceSets {
        all {
            languageSettings {
                useExperimentalAnnotation('kotlin.Experimental')
            }
        }
}
👍 1
m
thanks
is this described in a documentation somewhere?
How would one stumble upon this?
l
m
l
You can change that by clicking on Edit page and submitting a PR to improve it 🙂
m
oh right
will do that 😄
r
The building-mpp-with-gradle page tends to be the most up-to-date for this stuff. Lots of little things outdated elsewhere.