Jump to content

Compile mod without obfuscation to be used as dependency for other project


Recommended Posts

Posted

Can I compile my mod without obfuscating the resulting code? I want to use the compiled jar as a dependency in one of my other mods which I launch from the eclipse workspace so I need an unobfuscated result.

I don't want to link to the source directly because I don't want to provide that source on the github if possible, just the final (unobfuscated) jar.

Posted

I just want to add a note for all of you that read this:

 

Things that you have to copy to your build.gradle:

 

task deobfJar(type: Jar) { // Generate deobfuscated

    from sourceSets.main.output

    classifier = 'deobf'

}

task sourceJar(type: Jar) { // Generate sources

    from sourceSets.main.allSource

    classifier = 'sources'

}

tasks.build.dependsOn('sourceJar', 'deobfJar')

artifacts {

    archives deobfJar

    archives sourceJar

    archives jar

}

 

Make sure to include this after the minecraft {...} tab.

  • Thanks 1

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.