Posted June 15, 20178 yr In my mod i use an external library (Json.simple). Now, in order to use the mod you need to add the Json.simple jar inside the mod folder too, but what i want is to have a single jar file that contains both the mod and the library. Is this possible? And if so how can i tell gradle to export the library too into the generated jar file? Don't blame me if i always ask for your help. I just want to learn to be better
June 15, 20178 yr Author Dind't know that. But in general is it possible to bundle any external library into the jar? Don't blame me if i always ask for your help. I just want to learn to be better
June 15, 20178 yr If you want to try this out, then I suggest instead of bundling it, put it into mods folder. Forge should load it too, as long as it is Jar.
June 15, 20178 yr Author I know that putting the library into the mod folder works, but this is exactly what i want to know if can be avoided. I want to know if i can put just 1 jar file into the mod folder that will load both mod and library to avoid some errors from users (they could forget about the second jar) Don't blame me if i always ask for your help. I just want to learn to be better
June 15, 20178 yr Use the Gradle Shadow plugin. You can see how I use it to shadow one of my mod's dependencies here. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
June 15, 20178 yr Author Thanks, i will look at it Don't blame me if i always ask for your help. I just want to learn to be better
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.