To apply free compile args in Android I used below line (Gradle Kotlin DSL).
freeCompilerArgs = freeCompilerArgs + "-Xallow-result-return-type" + "-Xinline-classes"
How to apply it for KMP? I’m using Android Studio.
To apply free compile args in Android I used below line (Gradle Kotlin DSL).
freeCompilerArgs = freeCompilerArgs + "-Xallow-result-return-type" + "-Xinline-classes"
How to apply it for KMP? I’m using Android Studio.
tasks.withType<KotlinCompileCommon>().configureEach {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-Xallow-result-return-type" + "-Xinline-classes"
}
}
Didn’t work for me. I had to use the following (Kotlin 1.7.10):
sourceSets {
all {
languageSettings.optIn("org.mylibrary.OptInAnnotation")
}
}