{
super.applyPlugin();
// add the binPatching task
{
ApplyBinPatchesTask task = makeTask("applyBinPatches", ApplyBinPatchesTask.class);
task.setInJar(delayedFile(JAR_MERGED));
task.setOutJar(delayedFile(JAR_BINPATCHED));
task.setPatches(delayedFile(BINPATCHES));
task.setClassesJar(delayedFile(BINARIES_JAR));
task.setResources(delayedFileTree(RES_DIR));
task.dependsOn("mergeJars");
project.getTasks().getByName("deobfBinJar").dependsOn(task);
ProcessJarTask deobf = (ProcessJarTask) project.getTasks().getByName("deobfBinJar").dependsOn(task);;
deobf.setInJar(delayedFile(JAR_BINPATCHED));