mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@4781d28b Re-add Log4j Javadocs (#12693) PaperMC/Paper@74fbcce5 Check type of Material in get/set stats (#12607) PaperMC/Paper@4b3f967e Improve Fix MC-44654 (#12703) PaperMC/Paper@a7dd2635 Enable spigot obfuscation support (#12695) PaperMC/Paper@6a51c44e Cleanup Primed TNT Fix (#12704) PaperMC/Paper@839c6a18 Fix #11169 (#12706) PaperMC/Paper@c77d5f99 Fix MC-297591 PaperMC/Paper@219f86ee Implement chunk unload delay config option PaperMC/Paper@e4eb69b8 Do not allow ticket level decreases to be processed asynchronously PaperMC/Paper@71b0c768 Adds support for vanilla negative explosions (#12705) PaperMC/Paper@3750927a [ci/skip] Fix PermissionManager#clearPermissions() docs bad wording (#12657) PaperMC/Paper@d61a51e8 Add ItemType#getBurnDuration() (#12604) PaperMC/Paper@29fc8532 Allow empty paths in namespaced keys (#12687) PaperMC/Paper@4419afb9 fix: Safely handle nanosecond overflow in ClickCallback (#12686) PaperMC/Paper@56528821 Add `isProxyEnabled` method to ServerConfiguration (#12664) PaperMC/Paper@c0dda0ea Add `isForceDefaultGameMode` method (#12673) PaperMC/Paper@e714de63 Fix excess slot updates PaperMC/Paper@6d0821d2 [ci/skip] Fix docs for Spawner class and cleanup (#12710) PaperMC/Paper@cceffe3d Release ItemType and BlockType (#12708) PaperMC/Paper@186e9e33 Relocate CommandMap#registerServerAliases() call to after lifecycle events have been run (#12601)
146 lines
5.4 KiB
Diff
146 lines
5.4 KiB
Diff
--- a/paper-server/build.gradle.kts
|
|
+++ b/paper-server/build.gradle.kts
|
|
@@ -4,6 +_,7 @@
|
|
import paper.libs.com.google.gson.annotations.SerializedName
|
|
import java.time.Instant
|
|
import kotlin.io.path.readText
|
|
+import kotlin.io.path.writeText
|
|
|
|
plugins {
|
|
`java-library`
|
|
@@ -24,6 +_,18 @@
|
|
minecraftVersion = providers.gradleProperty("mcVersion")
|
|
gitFilePatches = false
|
|
|
|
+ // Purpur start - Rebrand
|
|
+ val purpur = forks.register("purpur") {
|
|
+ upstream.patchDir("paperServer") {
|
|
+ upstreamPath = "paper-server"
|
|
+ excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
|
|
+ patchesDir = rootDirectory.dir("purpur-server/paper-patches")
|
|
+ outputDir = rootDirectory.dir("paper-server")
|
|
+ }
|
|
+ }
|
|
+ activeFork = purpur
|
|
+ // Purpur end - Rebrand
|
|
+
|
|
spigot {
|
|
enabled = true
|
|
buildDataRef = "281ac0de7a76d808753ede97d11b034bc801b63d"
|
|
@@ -105,7 +_,21 @@
|
|
}
|
|
}
|
|
|
|
-val log4jPlugins = sourceSets.create("log4jPlugins")
|
|
+// Purpur start - Rebrand
|
|
+sourceSets {
|
|
+ main {
|
|
+ java { srcDir("../paper-server/src/main/java") }
|
|
+ resources { srcDir("../paper-server/src/main/resources") }
|
|
+ }
|
|
+ test {
|
|
+ java { srcDir("../paper-server/src/test/java") }
|
|
+ resources { srcDir("../paper-server/src/test/resources") }
|
|
+ }
|
|
+}
|
|
+val log4jPlugins = sourceSets.create("log4jPlugins") {
|
|
+ java { srcDir("../paper-server/src/log4jPlugins/java") }
|
|
+}
|
|
+// Purpur end - Rebrand
|
|
configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
|
extendsFrom(configurations.compileClasspath.get())
|
|
}
|
|
@@ -127,7 +_,7 @@
|
|
}
|
|
|
|
dependencies {
|
|
- implementation(project(":paper-api"))
|
|
+ implementation(project(":purpur-api")) // Purpur
|
|
implementation("ca.spottedleaf:concurrentutil:0.0.3")
|
|
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
|
|
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
|
|
@@ -155,6 +_,10 @@
|
|
implementation("org.spongepowered:configurate-yaml:4.2.0-20250225.064233-199")
|
|
implementation("org.spongepowered:configurate-core:4.2.0-20250225.064233-204") // Pinned dependency of above pinned yaml snapshot.
|
|
|
|
+ implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur
|
|
+ implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
|
|
+ implementation("dev.omega24:upnp4j:1.0") // Purpur
|
|
+
|
|
// Deps that were previously in the API but have now been moved here for backwards compat, eventually to be removed
|
|
runtimeOnly("commons-lang:commons-lang:2.6")
|
|
runtimeOnly("org.xerial:sqlite-jdbc:3.49.1.0")
|
|
@@ -203,14 +_,14 @@
|
|
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
|
|
attributes(
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
- "Implementation-Title" to "Paper",
|
|
+ "Implementation-Title" to "Purpur", // Purpur
|
|
"Implementation-Version" to implementationVersion,
|
|
"Implementation-Vendor" to date,
|
|
- "Specification-Title" to "Paper",
|
|
+ "Specification-Title" to "Purpur", // Purpur
|
|
"Specification-Version" to project.version,
|
|
- "Specification-Vendor" to "Paper Team",
|
|
- "Brand-Id" to "papermc:paper",
|
|
- "Brand-Name" to "Paper",
|
|
+ "Specification-Vendor" to "Purpur Team", // Purpur
|
|
+ "Brand-Id" to "purpurmc:purpur", // Purpur
|
|
+ "Brand-Name" to "Purpur", // Purpur
|
|
"Build-Number" to (build ?: ""),
|
|
"Build-Time" to buildTime.toString(),
|
|
"Git-Branch" to gitBranch,
|
|
@@ -269,7 +_,7 @@
|
|
jvmArgumentProviders.add(provider)
|
|
}
|
|
|
|
-val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
|
|
+val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("../paper-server/src/generated/java").asFile.toPath() // Purpur
|
|
idea {
|
|
module {
|
|
generatedSourceDirs.add(generatedDir.toFile())
|
|
@@ -372,3 +_,43 @@
|
|
classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip })
|
|
mainClass.set(null as String?)
|
|
}
|
|
+
|
|
+// tasks.register("rebuildMinecraftSourcesWithGit") {
|
|
+// group = "temp"
|
|
+//
|
|
+// val patchDir = project.rootDir.resolve("purpur-server/minecraft-patches/sources").convertToPath().cleanDir()
|
|
+// val inputDir = this.project.rootDir.resolve("purpur-server/src/minecraft/java").convertToPath()
|
|
+//
|
|
+// val git = Git(inputDir)
|
|
+// git("stash", "push").executeSilently(silenceErr = true)
|
|
+// git("checkout", "file").executeSilently(silenceErr = true)
|
|
+//
|
|
+// rebuildWithGit(git, patchDir)
|
|
+// }
|
|
+//
|
|
+// private fun rebuildWithGit(
|
|
+// git: Git,
|
|
+// patchDir: java.nio.file.Path
|
|
+// ): Int {
|
|
+// val files = git("diff-tree", "--name-only", "--no-commit-id", "-r", "HEAD").getText().split("\n")
|
|
+// files.parallelStream().forEach { filename ->
|
|
+// if (filename.isBlank()) return@forEach
|
|
+// val patch = git(
|
|
+// "format-patch",
|
|
+// "--diff-algorithm=myers",
|
|
+// "--full-index",
|
|
+// "--no-signature",
|
|
+// "--no-stat",
|
|
+// "--no-numbered",
|
|
+// "-1",
|
|
+// "HEAD",
|
|
+// "--stdout",
|
|
+// filename
|
|
+// ).getText()
|
|
+// val patchFile = patchDir.resolve("$filename.patch")
|
|
+// patchFile.createParentDirectories()
|
|
+// patchFile.writeText(patch)
|
|
+// }
|
|
+//
|
|
+// return files.size
|
|
+// }
|