How can I shadow and relocate reflect correctly? I...
# gradle
s
How can I shadow and relocate reflect correctly? I tried relocating the kotlin to kotlin1910. But makes kotlin reflect can't find
kotlin1910.kotlin1910_builtins
. Then, I added custom transformers for avoiding
shadow
relocate the
.kotlin_builtins
constant in kotlin reflect. And relocate the
kotlin/kotlin.kotlin_builtins
to
kotlin1910/kotlin1910.kotlin_builtins
But the reflect can't find the builtin class
AssertionError: Built-in class kotlin1910.Any is not found
Then are same. And same SHA256
m
You can use R8 to relocate the kotlin-stdlib Kotlin: https://blog.mbonnin.net/use-latest-kotlin-in-your-gradle-plugins. There are some gotchas but it's doable Edit: haven't tried with
kotlin-reflect
in particular (only
kotlin-stdlib
) but I guess that could work too?
v
Please don't cross-post to multiple channels, that wastes the time of anyone reading the message multiple times and splits discussions. Pick one appropriate channel according to name and subject and at most post a link in other channels if you really feel you need more attention.
☝️ 1
1
1
❤️ 1
s
I'll give a try for R8 @mbonnin And thanks your advice @Vampire
👌 1
👍 1