has anyone gotten the explicitApi flag to work in ...
# android-studio
d
has anyone gotten the explicitApi flag to work in android gradle modules?
1
j
it works for me
z
Yes, although if you exclude certain modules in the gradle config, the IDE won’t pick up on that and will still complain about missing visibility modifiers. It’s annoying for things like test source sets.
d
It doesn't work for me unfortunately. Maybe my setup is all wrong. I'd appreciate if anyone can share their gradle setup. Thanks
k
Hey @Daniel have you found a solution? I’m having the same problem -
explicitApi
is simply not working. I’m using AS 4.2. I’m trying to add this in my
android-library
module. I checked it in my multiplatform project (using IntelliJ) and there it is working as expected
d
still does not work for me
k
Sorry to hear that, but thanks for reply!
Seem like it’s not working for Android modules yet: https://youtrack.jetbrains.com/issue/KT-37652 I used workaround found here: https://youtrack.jetbrains.com/issue/KT-37652#focus=Comments-27-4501224.0-0 and it’s working well. You can also use this workaround: https://youtrack.jetbrains.com/issue/KT-37652#focus=Comments-27-4436939.0-0 but as it’s mentioned there, it will also enforce explicit API for android tests
d
thanks