Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to shadow v3 into the jar #98

Open
ytnoos opened this issue Feb 22, 2023 · 5 comments
Open

Unable to shadow v3 into the jar #98

ytnoos opened this issue Feb 22, 2023 · 5 comments
Labels
question Further information is requested

Comments

@ytnoos
Copy link

ytnoos commented Feb 22, 2023

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'

@derklaro
Copy link
Collaborator

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 :)

@derklaro derklaro added the question Further information is requested label Feb 22, 2023
@ytnoos
Copy link
Author

ytnoos commented Feb 22, 2023

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

@kingOf0
Copy link

kingOf0 commented Mar 25, 2023

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.

@ytnoos
Copy link
Author

ytnoos commented Mar 25, 2023

Already tried with implementation, I used shadow just as a test

@kingOf0
Copy link

kingOf0 commented Mar 25, 2023

Can you send your current gradle files?

Also, can you send picture of your "external libraries" files.
E.G.
image

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")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants