Jump to content

[SOLVED] Multiple entries with same key - add-on development


Recommended Posts

Posted

I can't get this to work for the life of me :(

 

First of:

Forge 1.7.10-10.13.2.1286

IntelliJ IDEA 13

 

So I want to make an add-on for a mod of mine. I've set up a local maven repo for the dependant mod and it's dependency. When building the dependand mod's dependency, it works. When I build the dependant mod, it works as well. As soon as I declare the dependant mod as dependency in my add-ons build.gradle, I get greeded with following error:

java.lang.IllegalArgumentException: Multiple entries with same key: varietychests=FMLMod:varietychests{1.2.0} and varietychests=FMLMod:varietychests{1.2.0}

(full crash report here)

 

So basically FML loads it twice for some reason I'm unaware of...

 

The dependency chain is as follows (with their build.gradle linked to each of them):

SAPManagerPack > dependency of > Variety Chests > dependency of > VarietyChests EBXL AddOn

 

Dependencies which don't have other dependencies work fine, but as soon as I have one of those which do have one, it messes up.

 

I dunno if there's something wrong with my maven setup or if gradle just bugs out...

 

And I've also tried to run

gradlew runClient

to exclude a faulty IDE, but that crashes with the same error.

 

 

If someone has any solution, I would be very thankful.

 

 

EDIT - SOLVED! So basically I've looked into the deobf.jar file again and noticed that it had 2 mcmod.info files in there, causing the duplication problem. The cause of this was actually a "fix" for IntelliJ 14, where you set

output.resourcesDir = output.classesDir

, which in turn fucks with my deobf jar.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

I solved it. So basically the fix for IntelliJ 14, where you put

output.resourcesDir = output.classesDir

into

sourceSets -> main

fucks with my deobf jar, causing it to duplicate my mcmod.info file and all my other classes.

 

Why this doesn't happen with my manager pack, I have no clue whatsoever...

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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