mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Put pom in correct location for Paperclip install to maven local feature
This commit is contained in:
parent
efc6fa6a04
commit
fdd125c43e
4 changed files with 36 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
`java-library`
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
@ -23,3 +24,9 @@ dependencies {
|
||||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||||
testImplementation("org.ow2.asm:asm-tree:7.3.1")
|
testImplementation("org.ow2.asm:asm-tree:7.3.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configure<PublishingExtension> {
|
||||||
|
publications.create<MavenPublication>("maven") {
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+
|
+
|
||||||
+plugins {
|
+plugins {
|
||||||
+ `java-library`
|
+ `java-library`
|
||||||
|
+ `maven-publish`
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+java {
|
+java {
|
||||||
|
@ -52,6 +53,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ testImplementation("org.ow2.asm:asm-tree:9.1")
|
+ testImplementation("org.ow2.asm:asm-tree:9.1")
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
+configure<PublishingExtension> {
|
||||||
|
+ publications.create<MavenPublication>("maven") {
|
||||||
|
+ from(components["java"])
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
+val generateApiVersioningFile by tasks.registering {
|
+val generateApiVersioningFile by tasks.registering {
|
||||||
+ val pomProps = layout.buildDirectory.file("pom.properties")
|
+ val pomProps = layout.buildDirectory.file("pom.properties")
|
||||||
+ outputs.file(pomProps)
|
+ outputs.file(pomProps)
|
||||||
|
|
|
@ -47,9 +47,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
))
|
))
|
||||||
for (tld in listOf("net", "com", "org")) {
|
for (tld in listOf("net", "com", "org")) {
|
||||||
attributes(mapOf(
|
attributes(mapOf(
|
||||||
@@ -0,0 +0,0 @@ tasks.jar {
|
@@ -0,0 +0,0 @@ configure<PublishingExtension> {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+val generatePom = tasks.named<GenerateMavenPom>("generatePomFileForMavenPublication")
|
||||||
|
+
|
||||||
tasks.shadowJar {
|
tasks.shadowJar {
|
||||||
|
+ // Needed for Paperclip's install to maven local feature
|
||||||
|
+ from(generatePom) {
|
||||||
|
+ into("META-INF/maven/io.papermc.paper/paper")
|
||||||
|
+ rename { "pom.xml" }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
listOf(
|
listOf(
|
||||||
- "jline", "it.unimi", "org.apache.commons.codec", "org.apache.commons.io",
|
- "jline", "it.unimi", "org.apache.commons.codec", "org.apache.commons.io",
|
||||||
+ "jline", "org.apache.commons.codec", "org.apache.commons.io", // Paper - don't relocate fastutil
|
+ "jline", "org.apache.commons.codec", "org.apache.commons.io", // Paper - don't relocate fastutil
|
||||||
|
|
|
@ -21,7 +21,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
|
|
||||||
+import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
+import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
||||||
+import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
|
+import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
|
||||||
+import io.papermc.paperweight.util.Git
|
+import io.papermc.paperweight.util.Git
|
||||||
|
@ -33,6 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+
|
+
|
||||||
+plugins {
|
+plugins {
|
||||||
+ java
|
+ java
|
||||||
|
+ `maven-publish`
|
||||||
+ id("com.github.johnrengelman.shadow")
|
+ id("com.github.johnrengelman.shadow")
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
@ -86,6 +86,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
+configure<PublishingExtension> {
|
||||||
|
+ publications.create<MavenPublication>("maven") {
|
||||||
|
+ // todo: confirm this is correct
|
||||||
|
+ from(components["java"])
|
||||||
|
+ artifact(tasks.reobfJar) {
|
||||||
|
+ classifier = "reobf"
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
+tasks.shadowJar {
|
+tasks.shadowJar {
|
||||||
+ listOf(
|
+ listOf(
|
||||||
+ "jline", "it.unimi", "org.apache.commons.codec", "org.apache.commons.io",
|
+ "jline", "it.unimi", "org.apache.commons.codec", "org.apache.commons.io",
|
||||||
|
|
Loading…
Reference in a new issue