Only generate the run configs on the root project

This commit is contained in:
modmuss50
2019-03-30 20:08:25 +00:00
parent a9a160b0bf
commit c43e771ef5
2 changed files with 12 additions and 1 deletions

View File

@@ -65,7 +65,9 @@ public class AbstractPlugin implements Plugin<Project> {
public void apply(Project target) {
this.project = target;
project.getLogger().lifecycle("Fabric Loom: " + AbstractPlugin.class.getPackage().getImplementationVersion());
if(isRootProject(target)){
project.getLogger().lifecycle("Fabric Loom: " + AbstractPlugin.class.getPackage().getImplementationVersion());
}
// Apply default plugins
project.apply(ImmutableMap.of("plugin", "java"));
@@ -281,4 +283,8 @@ public class AbstractPlugin implements Plugin<Project> {
}
});
}
public static boolean isRootProject(Project project){
return project.getRootProject() == project;
}
}