I would like to enable Explicit API mode for my Kotlin project. However, I cannot find a way how to do it. On the site, I can see only gradle
based configuration:
kotlin {
// for strict mode
explicitApi()
// or
explicitApi = ExplicitApiMode.Strict
}
I believe that you're using
kotlin-maven-plugin
, so you can pass additional arguments to compiler like thismore info can be found here: https://kotlinlang.org/docs/reference/using-maven.html#specifying-compiler-options