Skip to content
Advertisement

How to remove “extras” from using java gradle shadow plugin

I’m using the gradle shadow plugin in my java project.

JavaScript

I used the following code to get rid of all the dependencies I could.

JavaScript

However, I’ve got all these extra files in my jar file. I want to remove everything except what’s in the “eu” folder and the “plugin.yml”. How can I do this?

Extra files

Advertisement

Answer

Don’t use shadowJar {} unless you have to, just change “implementation” to “compileOnly” for the dependencies you don’t want in the jar

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement