Use conventions in RemapConfiguration to avoid need for afterEvaluate. (#514)
parent
ce0a3308ff
commit
e55763aca2
|
@ -107,9 +107,9 @@ public class RemapConfiguration {
|
|||
assert remapJarTask != null;
|
||||
|
||||
if (!remapJarTask.getInput().isPresent() && isDefaultRemap) {
|
||||
jarTask.setClassifier("dev");
|
||||
remapJarTask.setClassifier("");
|
||||
remapJarTask.getInput().set(jarTask.getArchivePath());
|
||||
jarTask.getArchiveClassifier().convention("dev");
|
||||
remapJarTask.getArchiveClassifier().convention("");
|
||||
remapJarTask.getInput().convention(jarTask.getArchiveFile());
|
||||
}
|
||||
|
||||
if (isDefaultRemap) {
|
||||
|
@ -177,8 +177,8 @@ public class RemapConfiguration {
|
|||
|
||||
RemapSourcesJarTask remapSourcesJarTask = (RemapSourcesJarTask) project.getTasks().findByName(remapSourcesJarTaskName);
|
||||
Preconditions.checkNotNull(remapSourcesJarTask, "Could not find " + remapSourcesJarTaskName + " in " + project.getName());
|
||||
remapSourcesJarTask.getInput().set(sourcesTask.getArchiveFile());
|
||||
remapSourcesJarTask.getOutput().set(sourcesTask.getArchiveFile());
|
||||
remapSourcesJarTask.getInput().convention(sourcesTask.getArchiveFile());
|
||||
remapSourcesJarTask.getOutput().convention(sourcesTask.getArchiveFile());
|
||||
remapSourcesJarTask.dependsOn(project.getTasks().getByName(sourcesJarTaskName));
|
||||
|
||||
if (isDefaultRemap) {
|
||||
|
|
Loading…
Reference in New Issue