dev/0.11
asie 2018-12-23 09:37:54 +01:00
parent 8d326da8be
commit 4700788ead
2 changed files with 8 additions and 3 deletions

View File

@ -43,7 +43,8 @@ public class ModRemapperProvider extends DependencyProvider {
// Provide JAR
File input = dependency.resolveFile().orElseThrow(() -> new RuntimeException("Could not find dependency " + dependency));
project.getLogger().lifecycle(":providing " + dependency.getDepString());
String rds = dependency.getResolvedDepString();
project.getLogger().lifecycle(":providing " + rds);
MappingsProvider mappingsProvider = getDependencyManager().getProvider(MappingsProvider.class);
String verSuffix = ".mapped." + mappingsProvider.mappingsName + "." + mappingsProvider.mappingsVersion;
@ -62,14 +63,14 @@ public class ModRemapperProvider extends DependencyProvider {
}
project.getDependencies().add("compile", project.getDependencies().module(
dependency.getDepString() + verSuffix
rds + verSuffix
));
postPopulationScheduler.accept(() -> {
// Provide sources JAR, if present
Optional<File> sourcesFile = dependency.resolveFile("sources");
if (sourcesFile.isPresent()) {
project.getLogger().lifecycle(":providing " + dependency.getDepString() + " sources");
project.getLogger().lifecycle(":providing " + rds + " sources");
try {
SourceRemapper.remapSources(project, sourcesFile.get(), new File(modStore, outputNamePrefix + "-sources.jar"), true);

View File

@ -169,5 +169,9 @@ public abstract class DependencyProvider {
public String getDepString(){
return dependency.getGroup() + ":" + dependency.getName() + ":" + dependency.getVersion();
}
public String getResolvedDepString(){
return dependency.getGroup() + ":" + dependency.getName() + ":" + getResolvedVersion();
}
}
}