geforkt von Mirrors/Paper
Fix artifact ids
Dieser Commit ist enthalten in:
Ursprung
7de25fd330
Commit
48c1ea17c3
@ -1,3 +1,5 @@
|
|||||||
|
import java.util.Locale
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
`java-library`
|
`java-library`
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
@ -27,6 +29,7 @@ dependencies {
|
|||||||
|
|
||||||
configure<PublishingExtension> {
|
configure<PublishingExtension> {
|
||||||
publications.create<MavenPublication>("maven") {
|
publications.create<MavenPublication>("maven") {
|
||||||
|
artifactId = project.name.toLowerCase(Locale.ENGLISH)
|
||||||
from(components["java"])
|
from(components["java"])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+
|
+
|
||||||
+configure<PublishingExtension> {
|
+configure<PublishingExtension> {
|
||||||
+ publications.create<MavenPublication>("maven") {
|
+ publications.create<MavenPublication>("maven") {
|
||||||
|
+ artifactId = project.name.toLowerCase(Locale.ENGLISH)
|
||||||
+ from(components["java"])
|
+ from(components["java"])
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
|
@ -38,22 +38,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||||
}
|
}
|
||||||
@@ -0,0 +0,0 @@ tasks.jar {
|
@@ -0,0 +0,0 @@ tasks.jar {
|
||||||
"Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
|
|
||||||
"Specification-Title" to "Bukkit",
|
"Specification-Title" to "Bukkit",
|
||||||
"Specification-Version" to project.version,
|
"Specification-Version" to project.version,
|
||||||
- "Specification-Vendor" to "Bukkit Team"
|
"Specification-Vendor" to "Bukkit Team",
|
||||||
+ "Specification-Vendor" to "Bukkit Team",
|
+ "Multi-Release" to "true", // Paper
|
||||||
+ "Multi-Release" to "true" // Paper
|
)
|
||||||
))
|
for (tld in setOf("net", "com", "org")) {
|
||||||
for (tld in listOf("net", "com", "org")) {
|
attributes("$tld/bukkit", "Sealed" to true)
|
||||||
attributes(mapOf(
|
@@ -0,0 +0,0 @@ publishing {
|
||||||
@@ -0,0 +0,0 @@ configure<PublishingExtension> {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+val generatePom = tasks.named<GenerateMavenPom>("generatePomFileForMavenPublication")
|
+val generatePom = tasks.named<GenerateMavenPom>("generatePomFileForMavenPublication")
|
||||||
+
|
+
|
||||||
tasks.shadowJar {
|
tasks.shadowJar {
|
||||||
|
archiveClassifier.set("mojang-mapped")
|
||||||
|
|
||||||
+ // Needed for Paperclip's install to maven local feature
|
+ // Needed for Paperclip's install to maven local feature
|
||||||
+ from(generatePom) {
|
+ from(generatePom) {
|
||||||
+ into("META-INF/maven/io.papermc.paper/paper")
|
+ into("META-INF/maven/io.papermc.paper/paper")
|
||||||
|
@ -28,6 +28,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+import shadow.org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.PLUGIN_CACHE_FILE
|
+import shadow.org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.PLUGIN_CACHE_FILE
|
||||||
+import java.text.SimpleDateFormat
|
+import java.text.SimpleDateFormat
|
||||||
+import java.util.Date
|
+import java.util.Date
|
||||||
|
+import java.util.Locale
|
||||||
+
|
+
|
||||||
+plugins {
|
+plugins {
|
||||||
+ java
|
+ java
|
||||||
@ -64,38 +65,39 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+tasks.jar {
|
+tasks.jar {
|
||||||
|
+ archiveClassifier.set("dev")
|
||||||
|
+
|
||||||
+ manifest {
|
+ manifest {
|
||||||
+ val git = Git(rootProject.layout.projectDirectory.path)
|
+ val git = Git(rootProject.layout.projectDirectory.path)
|
||||||
+ val gitHashCmd = git("rev-parse", "HEAD")
|
+ val gitHash = git("rev-parse", "HEAD").getText().substring(0, 7)
|
||||||
+ val gitHash = gitHashCmd.getText().substring(0, 7)
|
+ attributes(
|
||||||
+ attributes(mapOf(
|
|
||||||
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
|
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||||
+ "Implementation-Title" to "CraftBukkit",
|
+ "Implementation-Title" to "CraftBukkit",
|
||||||
+ "Implementation-Version" to "git-Paper-\"$gitHash\"",
|
+ "Implementation-Version" to "git-Paper-\"$gitHash\"",
|
||||||
+ "Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
|
+ "Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
|
||||||
+ "Specification-Title" to "Bukkit",
|
+ "Specification-Title" to "Bukkit",
|
||||||
+ "Specification-Version" to project.version,
|
+ "Specification-Version" to project.version,
|
||||||
+ "Specification-Vendor" to "Bukkit Team"
|
+ "Specification-Vendor" to "Bukkit Team",
|
||||||
+ ))
|
+ )
|
||||||
+ for (tld in listOf("net", "com", "org")) {
|
+ for (tld in setOf("net", "com", "org")) {
|
||||||
+ attributes(mapOf(
|
+ attributes("$tld/bukkit", "Sealed" to true)
|
||||||
+ "Sealed" to "true"
|
|
||||||
+ ), "$tld/bukkit")
|
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+configure<PublishingExtension> {
|
+publishing {
|
||||||
+ publications.create<MavenPublication>("maven") {
|
+ publications.create<MavenPublication>("maven") {
|
||||||
+ // todo: confirm this is correct
|
+ artifactId = rootProject.name.toLowerCase(Locale.ENGLISH)
|
||||||
+ from(components["java"])
|
|
||||||
+ artifact(tasks.reobfJar) {
|
+ artifact(tasks.reobfJar) {
|
||||||
+ classifier = "reobf"
|
+ classifier = null
|
||||||
+ }
|
+ }
|
||||||
|
+ artifact(tasks.shadowJar)
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+tasks.shadowJar {
|
+tasks.shadowJar {
|
||||||
|
+ archiveClassifier.set("mojang-mapped")
|
||||||
|
+
|
||||||
+ listOf(
|
+ listOf(
|
||||||
+ "jline", "it.unimi", "org.apache.commons.codec", "org.apache.commons.io",
|
+ "jline", "it.unimi", "org.apache.commons.codec", "org.apache.commons.io",
|
||||||
+ "org.apache.commons.lang3", "org.objectweb.asm"
|
+ "org.apache.commons.lang3", "org.objectweb.asm"
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren