mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 03:48:01 +01:00
Fix artifact ids
This commit is contained in:
parent
7de25fd330
commit
48c1ea17c3
@ -1,3 +1,5 @@
|
||||
import java.util.Locale
|
||||
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
@ -27,6 +29,7 @@ dependencies {
|
||||
|
||||
configure<PublishingExtension> {
|
||||
publications.create<MavenPublication>("maven") {
|
||||
artifactId = project.name.toLowerCase(Locale.ENGLISH)
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+configure<PublishingExtension> {
|
||||
+ publications.create<MavenPublication>("maven") {
|
||||
+ artifactId = project.name.toLowerCase(Locale.ENGLISH)
|
||||
+ from(components["java"])
|
||||
+ }
|
||||
+}
|
||||
|
@ -38,22 +38,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
}
|
||||
@@ -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-Version" to project.version,
|
||||
- "Specification-Vendor" to "Bukkit Team"
|
||||
+ "Specification-Vendor" to "Bukkit Team",
|
||||
+ "Multi-Release" to "true" // Paper
|
||||
))
|
||||
for (tld in listOf("net", "com", "org")) {
|
||||
attributes(mapOf(
|
||||
@@ -0,0 +0,0 @@ configure<PublishingExtension> {
|
||||
"Specification-Vendor" to "Bukkit Team",
|
||||
+ "Multi-Release" to "true", // Paper
|
||||
)
|
||||
for (tld in setOf("net", "com", "org")) {
|
||||
attributes("$tld/bukkit", "Sealed" to true)
|
||||
@@ -0,0 +0,0 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
+val generatePom = tasks.named<GenerateMavenPom>("generatePomFileForMavenPublication")
|
||||
+
|
||||
tasks.shadowJar {
|
||||
archiveClassifier.set("mojang-mapped")
|
||||
|
||||
+ // Needed for Paperclip's install to maven local feature
|
||||
+ from(generatePom) {
|
||||
+ 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 java.text.SimpleDateFormat
|
||||
+import java.util.Date
|
||||
+import java.util.Locale
|
||||
+
|
||||
+plugins {
|
||||
+ java
|
||||
@ -64,38 +65,39 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+}
|
||||
+
|
||||
+tasks.jar {
|
||||
+ archiveClassifier.set("dev")
|
||||
+
|
||||
+ manifest {
|
||||
+ val git = Git(rootProject.layout.projectDirectory.path)
|
||||
+ val gitHashCmd = git("rev-parse", "HEAD")
|
||||
+ val gitHash = gitHashCmd.getText().substring(0, 7)
|
||||
+ attributes(mapOf(
|
||||
+ val gitHash = git("rev-parse", "HEAD").getText().substring(0, 7)
|
||||
+ attributes(
|
||||
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
+ "Implementation-Title" to "CraftBukkit",
|
||||
+ "Implementation-Version" to "git-Paper-\"$gitHash\"",
|
||||
+ "Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
|
||||
+ "Specification-Title" to "Bukkit",
|
||||
+ "Specification-Version" to project.version,
|
||||
+ "Specification-Vendor" to "Bukkit Team"
|
||||
+ ))
|
||||
+ for (tld in listOf("net", "com", "org")) {
|
||||
+ attributes(mapOf(
|
||||
+ "Sealed" to "true"
|
||||
+ ), "$tld/bukkit")
|
||||
+ "Specification-Vendor" to "Bukkit Team",
|
||||
+ )
|
||||
+ for (tld in setOf("net", "com", "org")) {
|
||||
+ attributes("$tld/bukkit", "Sealed" to true)
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+configure<PublishingExtension> {
|
||||
+publishing {
|
||||
+ publications.create<MavenPublication>("maven") {
|
||||
+ // todo: confirm this is correct
|
||||
+ from(components["java"])
|
||||
+ artifactId = rootProject.name.toLowerCase(Locale.ENGLISH)
|
||||
+ artifact(tasks.reobfJar) {
|
||||
+ classifier = "reobf"
|
||||
+ classifier = null
|
||||
+ }
|
||||
+ artifact(tasks.shadowJar)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+tasks.shadowJar {
|
||||
+ archiveClassifier.set("mojang-mapped")
|
||||
+
|
||||
+ listOf(
|
||||
+ "jline", "it.unimi", "org.apache.commons.codec", "org.apache.commons.io",
|
||||
+ "org.apache.commons.lang3", "org.objectweb.asm"
|
||||
|
Loading…
Reference in New Issue
Block a user