Another attempt at fixing issues with fernflower's classpath
This commit is contained in:
parent
4a30993da7
commit
d91b722c35
2 changed files with 7 additions and 8 deletions
|
@ -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");
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue