Marko Mitic
08/23/2019, 4:02 PMinternal
kotlin classes are public
to java code. How to write kotlin library without exposing all classes to java?christiangruber
08/23/2019, 5:40 PMMarko Mitic
08/23/2019, 6:06 PMAmirul Zin
08/23/2019, 7:41 PM@JvmPackageVisibility
for package private class since that visibility is super helpful for library devs to cater for Java consumer.
In any case, you can look into @JvmSynthetic
. It only applies to functions, fields etc though, and not applicable to classes. You can, however, use that with internal
, which while the classes are still visible, the methods will at least be hidden from Kotlin and Java consumer.