Don't overwrite information set in RemapJar configure blocks after configure (#52)

dev/0.11
Falkreon 2019-01-09 15:13:35 -06:00 committed by Modmuss50
parent a6507ef7a1
commit 22507be8da
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ public class AbstractPlugin implements Plugin<Project> {
AbstractArchiveTask jarTask = (AbstractArchiveTask) project1.getTasks().getByName("jar"); AbstractArchiveTask jarTask = (AbstractArchiveTask) project1.getTasks().getByName("jar");
RemapJar remapJarTask = (RemapJar) project1.getTasks().findByName("remapJar"); RemapJar remapJarTask = (RemapJar) project1.getTasks().findByName("remapJar");
remapJarTask.jar = jarTask.getArchivePath(); if (remapJarTask.jar==null) remapJarTask.jar = jarTask.getArchivePath();
remapJarTask.doLast(task -> project1.getArtifacts().add("archives", remapJarTask.jar)); remapJarTask.doLast(task -> project1.getArtifacts().add("archives", remapJarTask.jar));
remapJarTask.dependsOn(project1.getTasks().getByName("jar")); remapJarTask.dependsOn(project1.getTasks().getByName("jar"));
project1.getTasks().getByName("build").dependsOn(remapJarTask); project1.getTasks().getByName("build").dependsOn(remapJarTask);