So I made it work using a little jvm hack. I created “my own version” of the Metadata
class. I just copied and pasted it from the kotlin sources and removed the internal
keyword. I also needed to add -Xallow-kotlin-package
as a compiler argument to allow creating a package named kotlin
.
This hack lets you access any internal class you want as far as I know. I’m not sure whether it will lead to any problems done the line but I hope that kotlin 1.3 get’s released before I run into any problems because of this.
And it’s a hobby project anyways
Before I forget, full credit to @zcb7kbgxtgjt he mentioned this approach here first.