From 3a8ca288e8c3d028bcd812d10e7e008a2490573e Mon Sep 17 00:00:00 2001 From: Marc Hermans Date: Mon, 18 Nov 2024 19:47:33 +0100 Subject: [PATCH] [Fix]: Properly collect all dependencies in a configuration (#255) --- .run/Remote.run.xml | 15 +++++++++++++++ .../gradle/common/util/ConfigurationUtils.java | 9 +++------ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 .run/Remote.run.xml diff --git a/.run/Remote.run.xml b/.run/Remote.run.xml new file mode 100644 index 00000000..24f5ccd9 --- /dev/null +++ b/.run/Remote.run.xml @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/common/src/main/java/net/neoforged/gradle/common/util/ConfigurationUtils.java b/common/src/main/java/net/neoforged/gradle/common/util/ConfigurationUtils.java index 14cd9f7d..aae46ad5 100644 --- a/common/src/main/java/net/neoforged/gradle/common/util/ConfigurationUtils.java +++ b/common/src/main/java/net/neoforged/gradle/common/util/ConfigurationUtils.java @@ -15,10 +15,7 @@ import org.gradle.util.internal.GUtil; import java.io.File; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import java.util.*; import java.util.function.Function; public class ConfigurationUtils { @@ -39,8 +36,8 @@ private ConfigurationUtils() { public static void extendsFrom(final Project project, final Configuration target, final Configuration... configurations) { for (Configuration configuration : configurations) { //We treat each configuration as a dependency collector in and of it-self, and copy the dependencies and dependency constraints to the target configuration. - target.getDependencies().addAllLater(project.provider(configuration::getDependencies)); - target.getDependencyConstraints().addAllLater(project.provider(configuration::getDependencyConstraints)); + target.getDependencies().addAllLater(project.provider(configuration::getAllDependencies)); + target.getDependencyConstraints().addAllLater(project.provider(configuration::getAllDependencyConstraints)); } }