diff --git a/Parchment-Common/build.gradle.kts b/Parchment-Common/build.gradle.kts index 263cded..fc00571 100644 --- a/Parchment-Common/build.gradle.kts +++ b/Parchment-Common/build.gradle.kts @@ -1,5 +1,41 @@ +import java.util.Locale +import java.net.URI + +plugins { + `maven-publish` +} + +java { + withSourcesJar() + withJavadocJar() +} + dependencies { val annotations = "org.jetbrains:annotations:21.0.1" compileOnly(annotations) testCompileOnly(annotations) +} + +configure { + publications.create("maven") { + from(components["java"]) + groupId = project.group as String? + artifactId = "Parchment-Common" + version = "1.17-R0.1-SNAPSHOT" + + pom { + name.set(project.name) + description.set("Common annotations for Parchment and other software") + } + } + + repositories { + maven { + credentials { + username = properties["edenusr"] as String? + password = properties["edenpwd"] as String? + } + url = URI.create("https://sonatype.projecteden.gg/repository/maven-snapshots/") + } + } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 0ec9824..8d27a52 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -group = me.lexikiq.parchment +group = me.lexikiq version = 1.17-R0.1-SNAPSHOT mcVersion = 1.17 diff --git a/patches/api/0001-Build-changes.patch b/patches/api/0001-Build-changes.patch index 54b0ebb..1363ba8 100644 --- a/patches/api/0001-Build-changes.patch +++ b/patches/api/0001-Build-changes.patch @@ -1,14 +1,20 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: lexikiq -Date: Thu, 17 Jun 2021 14:38:59 -0400 +Date: Sat, 19 Jun 2021 23:31:14 -0400 Subject: [PATCH] Build changes diff --git a/build.gradle.kts b/build.gradle.kts -index 6d04816e22f44a33c001d2b7e080402fba6af86c..8dea8af5898cfe89e6aa4a8d278eba32fc4214cf 100644 +index 6d04816e22f44a33c001d2b7e080402fba6af86c..f24243834c48f31613a36c3d1f8e779bfe93041e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -27,6 +27,7 @@ dependencies { +@@ -1,4 +1,5 @@ + import java.util.Locale ++import java.net.URI + + plugins { + `java-library` +@@ -27,6 +28,7 @@ dependencies { api("org.ow2.asm:asm:9.0") api("org.ow2.asm:asm-commons:9.0") api("org.apache.logging.log4j:log4j-api:2.14.1") // Paper @@ -16,3 +22,30 @@ index 6d04816e22f44a33c001d2b7e080402fba6af86c..8dea8af5898cfe89e6aa4a8d278eba32 compileOnly("org.apache.maven:maven-resolver-provider:3.8.1") compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0") +@@ -45,6 +47,26 @@ dependencies { + configure { + publications.create("maven") { + from(components["java"]) ++// Parchment start ++ groupId = project.group as String? ++ artifactId = project.name.toLowerCase(Locale.ENGLISH) ++ version = project.version as String? ++ ++ pom { ++ name.set(project.name) ++ description.set("Minecraft server software forked from Paper") ++ } ++ } ++ ++ repositories { ++ maven { ++ credentials { ++ username = properties["edenusr"] as String? ++ password = properties["edenpwd"] as String? ++ } ++ url = URI.create("https://sonatype.projecteden.gg/repository/maven-snapshots/") ++ } ++// Parchment end + } + } + diff --git a/patches/api/0003-Add-SoundEvent.patch b/patches/api/0003-Add-SoundEvent.patch index a8e3ee5..dd996e1 100644 --- a/patches/api/0003-Add-SoundEvent.patch +++ b/patches/api/0003-Add-SoundEvent.patch @@ -1,12 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: lexikiq -Date: Sat, 19 Jun 2021 16:17:40 -0400 +Date: Sat, 19 Jun 2021 22:55:10 -0400 Subject: [PATCH] Add SoundEvent diff --git a/src/main/java/me/lexikiq/event/sound/EntitySoundEvent.java b/src/main/java/me/lexikiq/event/sound/EntitySoundEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..de8606c42022589ed8b3841e531e001aaa716bcf +index 0000000000000000000000000000000000000000..af2a2e87c8e266e908a9a72df1e469842cb7f19d --- /dev/null +++ b/src/main/java/me/lexikiq/event/sound/EntitySoundEvent.java @@ -0,0 +1,49 @@ @@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..de8606c42022589ed8b3841e531e001a + } + + @Override -+ public World getWorld() { ++ public @org.jetbrains.annotations.NotNull World getWorld() { + return origin.getWorld(); + } +} @@ -336,10 +336,10 @@ index 0000000000000000000000000000000000000000..8623e03aa5ca094629bf6a20669ea8c5 +} diff --git a/src/main/java/me/lexikiq/event/sound/SoundEvent.java b/src/main/java/me/lexikiq/event/sound/SoundEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..77b17b76a5137b30d5f8f040c0bcfa5f143223cb +index 0000000000000000000000000000000000000000..5cc39ee9ae52a52bebde46236162f1260b96b3a0 --- /dev/null +++ b/src/main/java/me/lexikiq/event/sound/SoundEvent.java -@@ -0,0 +1,96 @@ +@@ -0,0 +1,97 @@ +package me.lexikiq.event.sound; + +import me.lexikiq.OptionalHumanEntity; @@ -434,5 +434,6 @@ index 0000000000000000000000000000000000000000..77b17b76a5137b30d5f8f040c0bcfa5f + * Gets the world in which the sound is being played + * @return sound's world + */ ++ @NotNull + public abstract World getWorld(); +} diff --git a/patches/reverted/server/0004-Build-sources.patch b/patches/reverted/server/0004-Build-sources.patch deleted file mode 100644 index 96f8ff3..0000000 --- a/patches/reverted/server/0004-Build-sources.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: lexikiq -Date: Tue, 4 May 2021 11:50:36 -0400 -Subject: [PATCH] Build sources - - -diff --git a/pom.xml b/pom.xml -index e8c91265e5694676b6fb6a4b3ee022b88d1e5cf0..afa475f33bad218e77e5a6f373615409b3eb5d60 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -405,6 +405,21 @@ - - - -+ -+ -+ org.apache.maven.plugins -+ maven-source-plugin -+ 3.2.0 -+ -+ -+ attach-sources -+ -+ jar -+ -+ -+ -+ -+ - - - diff --git a/patches/server/0001-Build-changes.patch b/patches/server/0001-Build-changes.patch index f2f00b1..0b4c49d 100644 --- a/patches/server/0001-Build-changes.patch +++ b/patches/server/0001-Build-changes.patch @@ -1,14 +1,23 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: lexikiq -Date: Fri, 18 Jun 2021 02:01:12 -0400 +Date: Sat, 19 Jun 2021 23:31:14 -0400 Subject: [PATCH] Build changes diff --git a/build.gradle.kts b/build.gradle.kts -index f111042223f0d7974785c37245bb60b75388163e..a7beb454b194f3e93cc1c5dc6d8ea783eafdf11b 100644 +index f111042223f0d7974785c37245bb60b75388163e..63d62bdc61c50a06d594a6635caeb61ea1445370 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -19,8 +19,8 @@ repositories { +@@ -5,6 +5,8 @@ import io.papermc.paperweight.util.path + 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 // Parchment ++import java.net.URI // Parchment + + plugins { + java +@@ -19,8 +21,8 @@ repositories { } dependencies { @@ -19,12 +28,48 @@ index f111042223f0d7974785c37245bb60b75388163e..a7beb454b194f3e93cc1c5dc6d8ea783 // Paper start implementation("org.jline:jline-terminal-jansi:3.12.1") implementation("net.minecrell:terminalconsoleappender:1.2.0") -@@ -119,7 +119,7 @@ tasks.test { +@@ -87,6 +89,26 @@ configure { + artifact(tasks.reobfJar) { + classifier = "reobf" + } ++// Parchment start ++ groupId = project.group as String? ++ artifactId = "parchment" ++ version = project.version as String? ++ ++ pom { ++ name.set(project.name) ++ description.set("Minecraft server software forked from Paper") ++ } ++ } ++ ++ repositories { ++ maven { ++ credentials { ++ username = properties["edenusr"] as String? ++ password = properties["edenpwd"] as String? ++ } ++ url = URI.create("https://sonatype.projecteden.gg/repository/maven-snapshots/") ++ } ++// Parchment end + } + } + +@@ -95,7 +117,7 @@ val generatePom = tasks.named("generatePomFileForMavenPublicat + tasks.shadowJar { + // Needed for Paperclip's install to maven local feature + from(generatePom) { +- into("META-INF/maven/io.papermc.paper/paper") ++ into("META-INF/maven/${project.group}/${project.name.toLowerCase(Locale.ENGLISH)}") // Parchment + rename { "pom.xml" } + } + +@@ -119,7 +141,7 @@ tasks.test { fun TaskContainer.registerRunTask( name: String, block: JavaExec.() -> Unit ): TaskProvider = register(name) { - group = "paper" -+ group = "paperweight" ++ group = "paperweight" // Parchment standardInput = System.`in` workingDir = rootProject.layout.projectDirectory.dir( providers.gradleProperty("runWorkDir").forUseAtConfigurationTime().orElse("run")