In `Android Studio Koala | 2024.1.1` when enabling...
# multiplatform
a
In
Android Studio Koala | 2024.1.1
when enabling the explicit public api I am getting error when applying the public modifier in AS. Is this known issue?
solved 1
👀 1
In the
build.gradle.kts
I have used below code to set the explicit public API flag
Copy code
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
    jvmTargetValidationMode.set(org.jetbrains.kotlin.gradle.dsl.jvm.JvmTargetValidationMode.ERROR)
    compilerOptions {
        freeCompilerArgs.add("-Xexplicit-api=strict")
    }
}
This is the warning that I am getting
e
don't use freeCompilerArgs, use
Copy code
kotlin {
    explicitApi()
}
a
Thanks for pointing this out. Do you know why this worked and
freeCompilerArgs
didn't? Is there any tracking bug for this?