Alexander Weickmann
10/13/2021, 4:30 PMThis declaration is experimental and its usage should be marked with '@org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalDceDsl' or '@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalDceDsl::class)'However, when I mark it with OptIn like so:
@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalDceDsl::class)
dceTask {
then the above warning disappears, but I get a warning for the OptIn itself:
This class can only be used with the compiler argument '-Xopt-in=kotlin.RequiresOptIn'I already enabled this compiler flag like so:
kotlin {
sourceSets.all {
languageSettings.optIn("kotlin.RequiresOptIn")
}
}
However, this seems to enable the OptIn only for the app source code, but not for the Gradle build script itself. How can we enable @OptIn annotation for the Gradle build script itself, so we can annotate the dceTask with OptIn and not in turn get a warning for the OptIn usage?turansky
10/13/2021, 5:22 PMSuppress
works fine 🙂Alexander Weickmann
10/14/2021, 9:57 AM