Use conventions in RemapConfiguration to avoid need for afterEvaluate. (#514)

dev/0.11
NinjaPhenix 2021-10-04 21:37:48 +01:00 committed by GitHub
parent ce0a3308ff
commit e55763aca2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -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) {