Skip to content

Instantly share code, notes, and snippets.

@killjoy1221
Last active August 25, 2016 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save killjoy1221/c9487befa9cafd65054f to your computer and use it in GitHub Desktop.
Save killjoy1221/c9487befa9cafd65054f to your computer and use it in GitHub Desktop.
reobf NamedObjectDomainContainer
reobf {
// the name of a Jar task
jar {
// for notch names
useNotchSrg() // Deprecated in 2.1. Use mappingType
// or for srg names
useSrgSrg() // Deprecated in 2.1. Use mappingType
// in latest
mappingType = 'NOTCH' // or 'SEARGE'
// or for some other mapping file
mapping = file('mappings.srg')
}
// reobf some other artifacts (using task name)
fatJar {} // just reobf this using defaults
obfJar {
// for modifying the classpath
classpath += configurations.api
// add some srg
extraLines 'CL: Test test/Test', 'CL: Test1 test/Test1'
extraFiles file('extra.srg') // or a file
// NOTE: This is meant for basic renaming. For shading and relocating, please use a proper shading plugin.
// I suggest shadow. https://github.com/johnrengelman/shadow
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment