Is there a visibility modifier between public and internal? This is for a library project with many gradle modules. API usage is meant only for all modules and not external consumers.
🚫 2
n
nfrankel
09/19/2019, 12:55 AM
nope
s
Sam
09/19/2019, 12:56 AM
Okay, is there something similar to Android's @hide for public APIs?
package-private wouldn't help in this case either. All a consumer has to do is put their class into the same package, right? And then they have access that is not desired.
I'm not familiar with @hide, but doing some SO research, it appears it merely hides the method(s) from the documentation.
Can't get to Dokka docs right now. Does it have something to hide a function from the docs?
s
Sam
09/19/2019, 12:05 PM
Android sdk library build process removes all methods/class marked as @hide
Sam
09/19/2019, 12:07 PM
This is a stub jar which is used only for compilation of an app. Eventually, when the app is run on the device, the API call is actually resolved by library loaded by dalvik VM on the device.
Sam
09/19/2019, 12:08 PM
This approach obviously doesn't work for new support, android x libraries which aren't stub versions and has the actual implementation.
Sam
09/20/2019, 9:58 PM
Looks like some kind of code obfuscation would help