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!
#Adding external libraries (JDA, tomlj) to my mod
26 messages · Page 1 of 1 (latest)
Toml
Shadow jar is built-in. Just added include for required dependencies (sometimes require manual write also sub dependencies)
include(implementation(...))
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
Is it. And ye you can't (at least I didn't found) make recursive dep include and you need do it one by one
All libs you can found here and by ClassNotFoundException just incluide required
if it is, then why do i have to include it as a plugin and cant run it if it isnt included as a plugin
and the entire reason for shadowjar to exist is for the transitive dependencies
You not need to write anyhing else to gradle that just incude
My longest manual list was this
Cause your gradle isn't part of they gradle. But it's still enoght to put jars into without any problem compare to Vanilla Java/Gradle
so it isnt automatically built in
there are a million different ones in there im not gonna go through every one checking if its already included or not
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
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