From 54f05e415c77efab356e186d41f9754948a1aecf Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sat, 28 Sep 2024 21:02:40 -0700 Subject: [PATCH] Specify mainCapabilityAttribute for paper-api Fixes the api being bundled into com.destroystokyo.paper as paper-mojangapi --- patches/api/0466-Brigadier-based-command-API.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/patches/api/0466-Brigadier-based-command-API.patch b/patches/api/0466-Brigadier-based-command-API.patch index 6e20f39837..941d83d06c 100644 --- a/patches/api/0466-Brigadier-based-command-API.patch +++ b/patches/api/0466-Brigadier-based-command-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Brigadier based command API Co-authored-by: Jake Potrebic diff --git a/build.gradle.kts b/build.gradle.kts -index 4da053d427f3f9c5e7fc144408836ebef80026c6..540fe7e2c110e79c3742f229b3ed8c54b101d260 100644 +index 4da053d427f3f9c5e7fc144408836ebef80026c6..a82bc1a12db5531c4c8ade8e6582cf2d5c35fd56 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,6 +27,7 @@ configurations.api { @@ -17,18 +17,22 @@ index 4da053d427f3f9c5e7fc144408836ebef80026c6..540fe7e2c110e79c3742f229b3ed8c54 // api dependencies are listed transitively to API consumers api("com.google.guava:guava:32.1.2-jre") api("com.google.code.gson:gson:2.10.1") -@@ -92,9 +93,29 @@ sourceSets { +@@ -92,9 +93,33 @@ sourceSets { } } // Paper end +// Paper start - brigadier API +val outgoingVariants = arrayOf("runtimeElements", "apiElements", "sourcesElements", "javadocElements") ++val mainCapability = "${project.group}:${project.name}:${project.version}" +configurations { + val outgoing = outgoingVariants.map { named(it) } + for (config in outgoing) { + config { ++ attributes { ++ attribute(io.papermc.paperweight.util.mainCapabilityAttribute, mainCapability) ++ } + outgoing { -+ capability("${project.group}:${project.name}:${project.version}") ++ capability(mainCapability) + capability("io.papermc.paper:paper-mojangapi:${project.version}") + capability("com.destroystokyo.paper:paper-mojangapi:${project.version}") + }