public class TaskSingleReobf extends org.gradle.api.DefaultTask implements IReobfuscator
To reobfuscate other artifacts or to change settings, use this in your build script.
reobf {
// the jar artifact to reobfuscate
jar {
// Using non-default srg names
// reobf to notch
useNotchSrg()
// or for Searge names
useSrgSrg()
// or something else
mappings = file('srgs/minecraft.srg')
// In case you need to modify the classpath
classpath += configurations.provided
// Use this to add srg files or lines
// You can combine strings and files.
extra 'PK: org/ejml your/pkg/ejml', file('srgs/mappings.srg')
// You can also use with '+=' and array
extra += ['CL: your/pkg/Original your/pkg/Renamed', file('srgs/mappings2.srg')]
}
// Some other artifact using default settings
// the brackets are needed to create it
otherJar {}
}
| Modifier and Type | Class and Description |
|---|---|
static class |
TaskSingleReobf.ClosureTransformer |
| Constructor and Description |
|---|
TaskSingleReobf() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtraSrgLine(java.lang.String srgLine) |
void |
addExtraSrgLines(java.util.Collection<java.lang.String> srgLines) |
void |
addExtraSrgLines(java.lang.String... srgLines) |
void |
addPostTransformer(groovy.lang.Closure<byte[]> decepticon) |
void |
addPostTransformer(ReobfTransformer autobot) |
void |
addPreTransformer(groovy.lang.Closure<byte[]> decepticon) |
void |
addPreTransformer(ReobfTransformer autobot) |
void |
addSecondarySrgFile(java.lang.Object thing) |
void |
doTask() |
void |
extra(java.util.Collection<java.lang.Object> o)
Adds a collection of additional srg files or lines for reobfuscating.
|
void |
extra(java.lang.Object... o)
Adds some additional srg files or lines for reobfuscating.
|
org.gradle.api.file.FileCollection |
getClasspath()
Gets the classpath used to reobfuscate.
|
java.io.File |
getDeobfFile() |
java.io.File |
getExceptorCfg() |
java.util.List<java.lang.Object> |
getExtra()
Gets the extra srg lines and files.
|
org.gradle.api.file.FileCollection |
getExtraSrgFiles() |
java.util.List<java.lang.String> |
getExtraSrgLines() |
java.io.File |
getFieldCsv() |
java.io.File |
getJar() |
java.lang.Object |
getMappings()
Gets the mappings file used to reobfuscate.
|
java.io.File |
getMethodCsv() |
java.util.List<ReobfTransformer> |
getPostTransformers() |
java.util.List<ReobfTransformer> |
getPreTransformers() |
java.io.File |
getPrimarySrg() |
java.io.File |
getRecompFile() |
boolean |
isDecomp() |
void |
setClasspath(org.gradle.api.file.FileCollection classpath)
Sets the classpath used to reobfuscate.
|
void |
setDecomp(boolean isDecomp) |
void |
setDeobfFile(java.lang.Object deobfFile) |
void |
setExceptorCfg(java.lang.Object file) |
void |
setExtra(java.util.List<java.lang.Object> extra)
Sets the extra lines and files.
|
void |
setFieldCsv(java.lang.Object fieldCsv) |
void |
setJar(java.lang.Object jar) |
void |
setMappings(java.lang.Object srg)
Sets the mappings file used to reobfuscate.
|
void |
setMethodCsv(java.lang.Object methodCsv) |
void |
setPrimarySrg(java.lang.Object srg) |
void |
setRecompFile(java.lang.Object recompFile) |
void |
useNotchSrg()
Sets the mappings to use Notch names.
|
void |
useSrgSrg()
Sets the mappings to use Searge names.
|
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setName, setOnlyIf, setOnlyIf, setProject, setProperty, setShouldRunAfter, shouldRunAfter, toStringpublic void doTask()
throws java.io.IOException
java.io.IOExceptionpublic java.io.File getJar()
public void setJar(java.lang.Object jar)
public org.gradle.api.file.FileCollection getClasspath()
IReobfuscatorclasspath += otherClasspath to add to it.getClasspath in interface IReobfuscatorpublic void setClasspath(org.gradle.api.file.FileCollection classpath)
IReobfuscatorclasspath += otherClasspath to add to it.setClasspath in interface IReobfuscatorclasspath - The new classpathpublic java.io.File getPrimarySrg()
public void setMappings(java.lang.Object srg)
IReobfuscatorFile.setMappings in interface IReobfuscatorsrg - The srg file or path to itpublic java.lang.Object getMappings()
IReobfuscatorFile or a String path for a DelayedFile.getMappings in interface IReobfuscatorpublic void useSrgSrg()
IReobfuscatoruseSrgSrg in interface IReobfuscatorpublic void useNotchSrg()
IReobfuscatoruseNotchSrg in interface IReobfuscatorpublic void setExtra(java.util.List<java.lang.Object> extra)
IReobfuscatorIReobfuscator.extra(Object...) or extra += [] instead of setting the
list manually.setExtra in interface IReobfuscatorextra - The list of srgspublic java.util.List<java.lang.Object> getExtra()
IReobfuscatorIReobfuscator.extra(Object...) or extra += [] instead of setting the
list manually.getExtra in interface IReobfuscatorpublic void extra(java.util.Collection<java.lang.Object> o)
IReobfuscatorextra in interface IReobfuscatoro - The collection to addpublic void extra(java.lang.Object... o)
IReobfuscatorextra in interface IReobfuscatoro - The array to addpublic void setPrimarySrg(java.lang.Object srg)
public void addSecondarySrgFile(java.lang.Object thing)
public org.gradle.api.file.FileCollection getExtraSrgFiles()
public java.util.List<java.lang.String> getExtraSrgLines()
public void addExtraSrgLine(java.lang.String srgLine)
public void addExtraSrgLines(java.lang.String... srgLines)
public void addExtraSrgLines(java.util.Collection<java.lang.String> srgLines)
public java.io.File getFieldCsv()
public void setFieldCsv(java.lang.Object fieldCsv)
public java.io.File getMethodCsv()
public void setMethodCsv(java.lang.Object methodCsv)
public java.io.File getExceptorCfg()
public void setExceptorCfg(java.lang.Object file)
public java.io.File getDeobfFile()
public void setDeobfFile(java.lang.Object deobfFile)
public java.io.File getRecompFile()
public void setRecompFile(java.lang.Object recompFile)
public boolean isDecomp()
public void setDecomp(boolean isDecomp)
public java.util.List<ReobfTransformer> getPostTransformers()
public void addPostTransformer(ReobfTransformer autobot)
public void addPostTransformer(groovy.lang.Closure<byte[]> decepticon)
public java.util.List<ReobfTransformer> getPreTransformers()
public void addPreTransformer(ReobfTransformer autobot)
public void addPreTransformer(groovy.lang.Closure<byte[]> decepticon)