}
{
String name = getBinDepName() + "-" + (hasApiVersion() ? "{API_VERSION}" : "{MC_VERSION}") + ".jar";
ProcessJarTask task = makeTask("deobfBinJar", ProcessJarTask.class);
task.setSrg(delayedFile(DEOBF_MCP_SRG));
task.setExceptorJson(delayedFile(EXC_JSON));
task.setExceptorCfg(delayedFile(EXC_MCP));
task.setFieldCsv(delayedFile(FIELD_CSV));
task.setMethodCsv(delayedFile(METHOD_CSV));
task.setInJar(delayedFile(JAR_MERGED));
task.setOutCleanJar(delayedFile("{API_CACHE_DIR}/" + name));
task.setOutDirtyJar(delayedFile(DIRTY_DIR + "/" + name));
task.setApplyMarkers(false);
task.setStripSynthetics(true);
configureDeobfuscation(task);
task.dependsOn("downloadMcpTools", "mergeJars", "genSrgs");
}
{
String name = "{API_NAME}-" + (hasApiVersion() ? "{API_VERSION}" : "{MC_VERSION}") + "-"+ CLASSIFIER_DEOBF_SRG +".jar";
ProcessJarTask task = makeTask("deobfuscateJar", ProcessJarTask.class);
task.setSrg(delayedFile(DEOBF_SRG_SRG));
task.setExceptorJson(delayedFile(EXC_JSON));
task.setExceptorCfg(delayedFile(EXC_SRG));
task.setInJar(delayedFile(JAR_MERGED));
task.setOutCleanJar(delayedFile("{API_CACHE_DIR}/" + name));
task.setOutDirtyJar(delayedFile(DIRTY_DIR + "/" + name));
task.setApplyMarkers(true);
configureDeobfuscation(task);
task.dependsOn("downloadMcpTools", "mergeJars", "genSrgs");
}
{
ReobfTask task = makeTask("reobf", ReobfTask.class);
task.dependsOn("genSrgs");
task.setExceptorCfg(delayedFile(EXC_SRG));
task.setSrg(delayedFile(REOBF_SRG));
task.setFieldCsv(delayedFile(FIELD_CSV));
task.setFieldCsv(delayedFile(METHOD_CSV));
task.reobf(project.getTasks().getByName("jar"), new Action<ArtifactSpec>()
{
@Override
public void execute(ArtifactSpec arg0)
{
JavaPluginConvention javaConv = (JavaPluginConvention) project.getConvention().getPlugins().get("java");
arg0.setClasspath(javaConv.getSourceSets().getByName("main").getCompileClasspath());
}
});
task.mustRunAfter("test");
project.getTasks().getByName("assemble").dependsOn(task);
project.getTasks().getByName("uploadArchives").dependsOn(task);
}
createPostDecompTasks();