Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Build a mod with jar dependency


Recommended Posts


I'm new in creating mods and using intellij idea. I saw a few tutorials about this topic, but if I use a dependency and build mod, the dependency doesn't want to compile into final jar.


My build.gradle:

dependencies {
    minecraft 'net.minecraftforge:forge:1.16.3-34.1.0'

    compile 'edu.cmu.sphinx:sphinx4-core:5prealpha-SNAPSHOT'
    compile 'edu.cmu.sphinx:sphinx4-data:5prealpha-SNAPSHOT'


And my build method:



But result is without compiled dependency. Where is a problem?

Thanks for replying.

Link to comment
Share on other sites

Libraries dont just automatically get built into the jar of each project that uses them.

That would be an immense waste of space/bandwidth.

Not to mention the potentially legalities of it. 

You wouldn't want to ship all of Minecraft in your Jar just because you use it as a dependency.

However if you DO want to shade a jar in, you can. There are tools such as the shadow plugin for gradle that'll let you choose which libraries to ship.


I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Patreon: http://www.patreon.com/lexmanos
Paypal: http://paypal.me/LexManos

BitCoin: 1Q8rWvUNMM2T1ZfDaFeeYQyVXtYoeT6tTn

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.