#Adding external libraries (JDA, tomlj) to my mod

26 messages · Page 1 of 1 (latest)

dark hill
#

I have a mod, which works, but i now want to get it into a JAR. It has 2 external dependencies, JDA and tomlj for discord bots and TOML. Now i want to include those in the JAR, so itll run on the server. I know im supposed to do this with shadow jar, but i cannot figure out how to. Either it includes too little, or WAY too much (mod with 1 file suddenly becomes 111 MB). It's a very annoying issue, since the entire mod works but i just cant compile it. Please help if you can!

blazing urchin
#

Tomlconcern

blazing urchin
#

include(implementation(...))

dark hill
#

its not buitl in, but the issue with include is that it doesnt include dependencies of dependencies

#

and those dependencies also have dependencies

#

and im not gonna go through every single dependency there might be

#

i dont even kow where i would find all of those dependencies

blazing urchin
#

All libs you can found here and by ClassNotFoundException just incluide required

dark hill
#

and the entire reason for shadowjar to exist is for the transitive dependencies

blazing urchin
#

You not need to write anyhing else to gradle that just incude

#

My longest manual list was this

blazing urchin
dark hill
#

so it isnt automatically built in

dark hill
#

i could do it, but it would be super annoying and not the best solution especially if i wanted to add more external libraries later on

dark hill
#

ANdh ow do i even know what the correcct names for these packages are

#

Its saying its missing some classes from antlr, which ive now included in the dependencies

#

yet its still giving the error

blazing urchin
#

I mostly just putting whole name (package and class) to any place in code

#

Ctrl + Right Click on it

#

and it open correct package in External Libraries

dark hill
#

im not fully getting what u mean by this

#

where am i supposed to ctrl right click