Merge remote-tracking branch 'FabricMC/dev/0.12' into dev/0.12.0

This commit is contained in:
shedaniel
2022-07-16 15:59:51 +08:00

View File

@@ -249,22 +249,30 @@ public class SourceRemapper {
m.setGracefulClasspathChecks(true);
m.setSourceCompatibility(Constants.MERCURY_SOURCE_VERSION);
final List<Path> classPath = new ArrayList<>();
for (File file : project.getConfigurations().getByName(Constants.Configurations.LOADER_DEPENDENCIES).getFiles()) {
m.getClassPath().add(file.toPath());
classPath.add(file.toPath());
}
if (!toNamed) {
for (File file : project.getConfigurations().getByName("compileClasspath").getFiles()) {
m.getClassPath().add(file.toPath());
classPath.add(file.toPath());
}
} else {
for (RemappedConfigurationEntry entry : Constants.MOD_COMPILE_ENTRIES) {
for (File inputFile : project.getConfigurations().getByName(entry.sourceConfiguration()).getFiles()) {
m.getClassPath().add(inputFile.toPath());
classPath.add(inputFile.toPath());
}
}
}
for (Path path : classPath) {
if (Files.exists(path)) {
m.getClassPath().add(path);
}
}
return m;
}