From 9adbb0e5c10864de331b75480f71c98b834a40f4 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:47:24 -0700 Subject: [PATCH] Specify mainCapabilityAttribute for paper-api --- build.gradle.kts | 2 +- patches/api/Brigadier-based-command-API.patch | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9f0522ccbd..20ab99b72b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ import kotlin.io.path.* plugins { java `maven-publish` - id("io.papermc.paperweight.core") version "1.7.3" + id("io.papermc.paperweight.core") version "1.7.4" } allprojects { diff --git a/patches/api/Brigadier-based-command-API.patch b/patches/api/Brigadier-based-command-API.patch index c9f4c67869..03bbf79624 100644 --- a/patches/api/Brigadier-based-command-API.patch +++ b/patches/api/Brigadier-based-command-API.patch @@ -23,12 +23,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // 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}") + }