Fix genSources not working when root project doesnt have loom applied#308. (#309)

loom now runs genSources on root project if the plugin exists in the root project, else it will build in the current project.

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
dev/0.11
solonovamax 2020-12-21 14:48:26 -05:00 committed by GitHub
parent 7e5053b0c5
commit c96396fb27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 39 additions and 37 deletions

View File

@ -99,7 +99,9 @@ public abstract class AbstractFernFlowerDecompiler implements LoomDecompiler {
Map<String, ProgressLogger> inUseLoggers = new HashMap<>();
progressGroup.started();
ExecResult result = ForkingJavaExec.javaexec(project.getRootProject(), spec -> {
ExecResult result = ForkingJavaExec.javaexec(
project.getRootProject().getPlugins().hasPlugin("fabric-loom") ? project.getRootProject() : project,
spec -> {
spec.setMain(fernFlowerExecutor().getName());
spec.jvmArgs("-Xms200m", "-Xmx3G");
spec.setArgs(args);