Commit 93cca6a
committed
fix(minestom): configure shadowJar so the loader gets a real JarInJar
The :minestom module declared the shadow plugin but had no shadowJar
configuration, so its output was a plain <name>-all.jar with no
relocations. :minestom/loader/build.gradle then embeds that file via
`from { project(':minestom').tasks.shadowJar.archiveFile }`, which the
Shadow plugin unzips because the file has a .jar extension. Result: the
published net.luckperms:minestom-loader jar carries un-relocated
net/kyori/adventure/** and net/bytebuddy/** at the top level, defeating
the JarInJar isolation and pinning every consumer (Titan, etc.) to
LuckPerms' bundled Adventure version. Visible in the published artifact.
Mirror the :velocity shadowJar config (closest adventure-native analogue):
- archiveFileName = 'luckperms-minestom.jarinjar' so the loader's `from`
copies it verbatim (Shadow does not unzip non-.jar inputs) and so the
JarInJarClassLoader resource lookup matches MinestomLoader's JAR_NAME
- the same relocate set as :velocity (adventure, event, caffeine, okio,
okhttp3, bytebuddy, commodore, mariadb, mysql, postgresql, hikari,
mongodb, bson, jedis, nats, rabbitmq, commonspool2, configurate, yaml)
- artifacts { archives shadowJar } so the loader picks up the new file
After this, minestom-loader-5.6-SNAPSHOT.jar contains
luckperms-minestom.jarinjar as a single resource (no top-level
net/kyori/adventure/**) and the embedded LuckPerms platform runs in its
JarInJar-isolated classloader as designed.
https://claude.ai/code/session_01S76fk9ma5Szkf9r1W44RVP1 parent 9716796 commit 93cca6a
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
18 | 46 | | |
19 | 47 | | |
20 | 48 | | |
| |||
0 commit comments