Are these compiler flags still supported? If so ar...
# compiler
c
Are these compiler flags still supported? If so are they specific to the jvm target or do they apply to all targets?
Copy code
tasks.withType<KotlinCompilationTask<*>>().configureEach {
    compilerOptions {
        freeCompilerArgs = buildList {
            add("-Xno-call-assertions")
            add("-Xno-param-assertions")
            add("-Xno-receiver-assertions")
        }
    }
}
u
They are still supported, and they are JVM-only, since these assertions are only generated on JVM.
gratitude thank you 1
c
@udalov Testing this I still see calls to checkNotNullParameter() in traces from apps using my library. Is this expected? I have applied these compiler option:
Copy code
jvm {
    compilerOptions {
        freeCompilerArgs.add("-Xno-call-assertions")
        freeCompilerArgs.add("-Xno-param-assertions")
        freeCompilerArgs.add("-Xno-receiver-assertions")
    }
}
u
Most likely some other code, which is compiled without the flag (in this case
-Xno-param-assertions
), has this assertion generated