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