Hello, is it possible to ship relocated kotlin lib...
# gradle
s
Hello, is it possible to ship relocated kotlin libraries with the shadowJar plugin? Currently I'm having an issue with
kotlin_builtins
classes not being found
m
I found it not easy mainly because of https://github.com/johnrengelman/shadow/issues/232
I've never bumped into the
kotlin_builtins
issue though. What is the stacktrace you got?
s
here you go: https://pastebin.com/S9TcJbui I also made sure the services are relocated properly
m
So kotlin-reflect is looking for
dev.su5ed.repack.kotlin.Any
which doesn't exist.
s
I get that 😛
m
Reflection + shadowing is risky.
I guess
kotlin.Any
never exists on the classpath and is substituted with
java.lang.Object
instead?
s
I'll probably do a jar-in-jar instead. Also, where is
Any
declared? Perhaps in
kotlin.kotlin_builtins
?
m
Which would explain why it's not present... But not really why
primaryConstructor
requires it
where is
Any
declared
My understanding is that
Any
doesn't exist as java bytecode. It exists in the language but the compiler substitutes
Object
in the output
(don't quote me on that)
s
the former seems to be the case
and none of the kotlin_builtins files are affected by relocation
which would explain why it can't find the class
e