mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 05:27:43 -05:00
pull in annotationProcessor dependencies from fabric-loader JSON too
This commit is contained in:
@@ -139,12 +139,13 @@ public class LoomGradleExtension {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static Dependency findDependency(Collection<Configuration> configs, BiPredicate<String, String> groupNameFilter) {
|
||||
private static Dependency findDependency(Project p, Collection<Configuration> configs, BiPredicate<String, String> groupNameFilter) {
|
||||
for (Configuration config : configs) {
|
||||
for (Dependency dependency : config.getDependencies()) {
|
||||
String group = dependency.getGroup();
|
||||
String name = dependency.getName();
|
||||
if (groupNameFilter.test(group, name)) {
|
||||
p.getLogger().debug("Loom findDependency found: " + group + ":" + name + ":" + dependency.getVersion());
|
||||
return dependency;
|
||||
}
|
||||
}
|
||||
@@ -171,12 +172,12 @@ public class LoomGradleExtension {
|
||||
private Dependency getMixinDependency() {
|
||||
return recurseProjects((p) -> {
|
||||
List<Configuration> configs = new ArrayList<>();
|
||||
// check compile first
|
||||
configs.add(p.getConfigurations().getByName("compile"));
|
||||
// check compile classpath first
|
||||
configs.add(p.getConfigurations().getByName("compileClasspath"));
|
||||
// failing that, buildscript
|
||||
configs.addAll(p.getBuildscript().getConfigurations());
|
||||
|
||||
return findDependency(configs, (group, name) -> {
|
||||
return findDependency(p, configs, (group, name) -> {
|
||||
if (name.equalsIgnoreCase("mixin") && group.equalsIgnoreCase("org.spongepowered")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user