npc-lib
npc-lib copied to clipboard
Unable to shadow v3 into the jar
Hi, I wanted to swtich from v2 to v3 but since I did, NPC-Lib is not getting shadowed inside my plugin JAR even if the only thing I changed is the version. (the dependency is found correctly). I also put these lines to be sure it wasn't getting excluded for some reasons
shadow 'com.github.juliarn.NPC-Lib:api:3.0.0-beta2' shadow 'com.github.juliarn.NPC-Lib:bukkit:3.0.0-beta2'
This has to be an issue on your side. You could post your gradle setup so I can take a look if I can see the cause, but it's 100% not our fault :)
Sure! I opened an issue because I didn't find any other ways to ask for help. It's a bit strange because v2 shadows without any issue.
game: https://paste.coralmc.it/ukoqamisim.rb api-game: https://paste.coralmc.it/wobeyayewe.properties main build.gradle: https://paste.coralmc.it/vusudakeya.properties
I know a month is passed. But, this can help to further viewers.
Docs says:
Dependencies added to the shadow configuration are not bundled into the output JAR.
When using shadow
NPC-Lib won't be shaded into jar. You must use implementation
instead of shadow
.
I'm not sure why v2 is worked. There could be another jar which added lib to the class path.
Already tried with implementation, I used shadow just as a test
Can you send your current gradle files?
Also, can you send picture of your "external libraries" files.
E.G.
Edit:
Here's my current setup. I'm using kotlin dsl.
build.gradle.kts
dependencies {
implementation("com.github.juliarn.NPC-Lib:npc-lib-bukkit:3.0.0-beta3")
}
I'm also relocating it.
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
relocate("com.github.juliarn", "com.kingOf0.farmer.shade.juliarn")
}
The readme contains some instructions how to relocate the lib now. If you still have these issues please open a new issue.