I have some third party package. I want to add some custom classes to this package nand have access to all package private variables without touching the jar so in my project I create a class file and declare "package thirdparty.package" . Can I do that? Does it work in Kotlin or does it have to be somehow in the same folder ?
c
CLOVIS
10/17/2020, 7:54 PM
I'm pretty sure you can just add the
package
directive to the top of your file and that's it
n
NurBahnhof
10/17/2020, 10:41 PM
Actually the package is a Java package so it's sadly not possible :(
c
CLOVIS
10/18/2020, 8:56 AM
You can have a Java and Kotlin packages with the same name, the JVM will think they're the same package