Relocating Kotlin Builtin Classes

Hello,

I’ve run into a problem with Kotlin relocation in regards to using kotlin-reflect.
Specifically, in certain applications (in my case, the Minecraft server software Spigot), if multiple “plugins” are using kotlin-reflect there’s a conflict as neither the maven-shade-plugin or Gradle shadowJar can properly relocate the builtin classes. Writing a Maven or Gradle plugin to do this manually is a bit difficult as the documentation for the builtin class format is practically nonexistent.

Does anyone know of a way to properly relocate them?