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();