Another attempt at fixing issues with fernflower's classpath

dev/0.11
modmuss50 2021-01-21 20:09:48 +00:00
parent 4a30993da7
commit d91b722c35
2 changed files with 7 additions and 8 deletions

View File

@ -100,7 +100,7 @@ public abstract class AbstractFernFlowerDecompiler implements LoomDecompiler {
progressGroup.started();
ExecResult result = ForkingJavaExec.javaexec(
project.getRootProject().getPlugins().hasPlugin("fabric-loom") ? project.getRootProject() : project,
project,
spec -> {
spec.setMain(fernFlowerExecutor().getName());
spec.jvmArgs("-Xms200m", "-Xmx3G");

View File

@ -47,15 +47,14 @@ public class ForkingJavaExec {
});
}
private static Set<Configuration> getForkedFernflowerClasspath(Project project) {
private static Configuration[] getForkedFernflowerClasspath(Project project) {
Set<Configuration> allConfigurations = new HashSet<>();
Project p = project;
allConfigurations.addAll(project.getBuildscript().getConfigurations());
do {
allConfigurations.addAll(p.getBuildscript().getConfigurations());
p = p.getRootProject();
} while (p != p.getRootProject());
if (project.getRootProject() != project) {
allConfigurations.addAll(project.getRootProject().getBuildscript().getConfigurations());
}
return allConfigurations;
return allConfigurations.toArray(new Configuration[0]);
}
}