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

JitPack dependencies not working


Reflxction
 Share

Recommended Posts

Hello,slately I've been running into a really annoying problem. I'm making a mod and trying to use a dependency from jitpack, but it's failing to build, and when it builds, I end up crashing with a NoClassDefFoundError. The dependency I'm trying to use is https://github.com/KevinPriv/HypixelApi4J, and in the coding area it works perfectly fine, but when I build, there are two cases:

 

1, if I add 

jar {
    from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
}

 

then it wouldn't build and give me a "java.util.zip.ZipException: duplicate entry: me/kbrewster/exceptions/InvalidSessionException.class", which is a class from the library I'm trying to use.

 

2, if I don't add the thing above, it would build successfully but would end up crashing with a NoClassDefFoundError.

 

Here's my build.gradle: https://www.hastebin.com/egimacuqim.cs

I've never used Gradle before as I'm used to maven, so don't judge me if I did any stupid mistake. Thanks

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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.