From 993b9c3dd29fba8dbf996e9bda2457003729f499 Mon Sep 17 00:00:00 2001 From: Luke Bemish Date: Sat, 27 Apr 2024 10:02:05 -0500 Subject: [PATCH] Make jarJar configuration not consumable (#149) --- .../gradle/common/extensions/DefaultJarJarFeature.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/main/java/net/neoforged/gradle/common/extensions/DefaultJarJarFeature.java b/common/src/main/java/net/neoforged/gradle/common/extensions/DefaultJarJarFeature.java index 36e99f6d0..75a9a4231 100644 --- a/common/src/main/java/net/neoforged/gradle/common/extensions/DefaultJarJarFeature.java +++ b/common/src/main/java/net/neoforged/gradle/common/extensions/DefaultJarJarFeature.java @@ -119,6 +119,10 @@ public void createTaskAndConfiguration() { configuration.getAllDependencies().configureEach(dep -> this.enable() ); + // jarJar configurations should be resolvable, but ought not to be exposed to consumers; + // as it has attributes, it could conflict with normal exposed configurations + configuration.setCanBeResolved(true); + configuration.setCanBeConsumed(false); JavaPluginExtension javaPlugin = project.getExtensions().getByType(JavaPluginExtension.class);