Specify mainCapabilityAttribute for paper-api
Fixes the api being bundled into com.destroystokyo.paper as paper-mojangapi
This commit is contained in:
parent
6d7a438fad
commit
54f05e415c
1 changed files with 7 additions and 3 deletions
|
@ -6,7 +6,7 @@ Subject: [PATCH] Brigadier based command API
|
||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 4da053d427f3f9c5e7fc144408836ebef80026c6..540fe7e2c110e79c3742f229b3ed8c54b101d260 100644
|
index 4da053d427f3f9c5e7fc144408836ebef80026c6..a82bc1a12db5531c4c8ade8e6582cf2d5c35fd56 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -27,6 +27,7 @@ configurations.api {
|
@@ -27,6 +27,7 @@ configurations.api {
|
||||||
|
@ -17,18 +17,22 @@ index 4da053d427f3f9c5e7fc144408836ebef80026c6..540fe7e2c110e79c3742f229b3ed8c54
|
||||||
// api dependencies are listed transitively to API consumers
|
// api dependencies are listed transitively to API consumers
|
||||||
api("com.google.guava:guava:32.1.2-jre")
|
api("com.google.guava:guava:32.1.2-jre")
|
||||||
api("com.google.code.gson:gson:2.10.1")
|
api("com.google.code.gson:gson:2.10.1")
|
||||||
@@ -92,9 +93,29 @@ sourceSets {
|
@@ -92,9 +93,33 @@ sourceSets {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
+// Paper start - brigadier API
|
+// Paper start - brigadier API
|
||||||
+val outgoingVariants = arrayOf("runtimeElements", "apiElements", "sourcesElements", "javadocElements")
|
+val outgoingVariants = arrayOf("runtimeElements", "apiElements", "sourcesElements", "javadocElements")
|
||||||
|
+val mainCapability = "${project.group}:${project.name}:${project.version}"
|
||||||
+configurations {
|
+configurations {
|
||||||
+ val outgoing = outgoingVariants.map { named(it) }
|
+ val outgoing = outgoingVariants.map { named(it) }
|
||||||
+ for (config in outgoing) {
|
+ for (config in outgoing) {
|
||||||
+ config {
|
+ config {
|
||||||
|
+ attributes {
|
||||||
|
+ attribute(io.papermc.paperweight.util.mainCapabilityAttribute, mainCapability)
|
||||||
|
+ }
|
||||||
+ outgoing {
|
+ outgoing {
|
||||||
+ capability("${project.group}:${project.name}:${project.version}")
|
+ capability(mainCapability)
|
||||||
+ capability("io.papermc.paper:paper-mojangapi:${project.version}")
|
+ capability("io.papermc.paper:paper-mojangapi:${project.version}")
|
||||||
+ capability("com.destroystokyo.paper:paper-mojangapi:${project.version}")
|
+ capability("com.destroystokyo.paper:paper-mojangapi:${project.version}")
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue