colintheshots
08/14/2020, 6:05 PMkotlin.explicitApi()
Zach Klippenstein (he/him) [MOD]
08/14/2020, 6:07 PMkotlinOptions
, but it doesn’t appear to be. 🤔colintheshots
08/14/2020, 6:08 PMcolintheshots
08/14/2020, 6:12 PMRedundantVisibilityModifier
all over the codebase. It seems that should be disabled for explicit API=strict.
android {
// ...
kotlinOptions {
// using explicit API mode to guarantee we only expose methods we intend
freeCompilerArgs += "-Xexplicit-api=strict"
}
}
colintheshots
08/14/2020, 6:23 PMZach Klippenstein (he/him) [MOD]
08/14/2020, 7:36 PMandroid {
…
}
kotlin {
explicitApi = Strict
// or
explicitApi()
}
dependencies {
…
Zach Klippenstein (he/him) [MOD]
08/14/2020, 7:36 PMralf
08/14/2020, 7:36 PMralf
08/14/2020, 7:37 PMralf
08/14/2020, 7:37 PMZach Klippenstein (he/him) [MOD]
08/14/2020, 7:40 PMcolintheshots
08/14/2020, 7:41 PMZach Klippenstein (he/him) [MOD]
08/14/2020, 7:46 PMfreeCompilerArgs
works for me too. I wonder if the Kotlin DSL is broken.ralf
08/14/2020, 7:46 PMralf
08/14/2020, 7:46 PMZach Klippenstein (he/him) [MOD]
08/14/2020, 7:47 PMZach Klippenstein (he/him) [MOD]
08/14/2020, 7:50 PMralf
08/14/2020, 7:51 PMralf
08/14/2020, 7:52 PMZach Klippenstein (he/him) [MOD]
08/14/2020, 7:53 PMZach Klippenstein (he/him) [MOD]
08/14/2020, 7:54 PMtasks.withType<KotlinCompile> {
if (!name.contains("test", ignoreCase = true)) {
kotlinOptions {
Zach Klippenstein (he/him) [MOD]
08/14/2020, 8:00 PMchao
11/10/2020, 1:33 AM