mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@c8a4f0b6 Updated Upstream (Paper) PurpurMC/Purpur@e8fe8ece forgot to commit this PurpurMC/Purpur@45bc9f41 Updated Upstream (Paper)
201 lines
9.7 KiB
Diff
201 lines
9.7 KiB
Diff
--- a/purpur-server/build.gradle.kts
|
|
+++ b/purpur-server/build.gradle.kts
|
|
@@ -13,6 +_,7 @@
|
|
}
|
|
|
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
|
+val bxTeamMavenPublicUrl = "https://repo.bxteam.org/snapshots/"
|
|
|
|
dependencies {
|
|
mache("io.papermc:mache:1.21.10+build.4")
|
|
@@ -26,6 +_,7 @@
|
|
|
|
// Purpur start - Rebrand
|
|
val purpur = forks.register("purpur") {
|
|
+ rootDirectory = upstreamsDirectory().map { it.dir("purpur") }
|
|
upstream.patchDir("paperServer") {
|
|
upstreamPath = "paper-server"
|
|
excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
|
|
@@ -33,9 +_,27 @@
|
|
outputDir = rootDirectory.dir("paper-server")
|
|
}
|
|
}
|
|
- activeFork = purpur
|
|
// Purpur end - Rebrand
|
|
|
|
+ // DivineMC start - Rebrand
|
|
+ val divinemc = forks.register("divinemc") {
|
|
+ forks = purpur
|
|
+ upstream.patchRepo("paperServer") {
|
|
+ upstreamRepo = purpur.patchedRepo("paperServer")
|
|
+ patchesDir = rootDirectory.dir("divinemc-server/paper-patches")
|
|
+ outputDir = rootDirectory.dir("paper-server")
|
|
+ }
|
|
+ upstream.patchDir("purpurServer") {
|
|
+ upstreamPath = "purpur-server"
|
|
+ excludes = setOf("src/minecraft", "paper-patches", "minecraft-patches", "build.gradle.kts", "build.gradle.kts.patch")
|
|
+ patchesDir = rootDirectory.dir("divinemc-server/purpur-patches")
|
|
+ outputDir = rootDirectory.dir("purpur-server")
|
|
+ }
|
|
+ }
|
|
+
|
|
+ activeFork = divinemc
|
|
+ // DivineMC end - Rebrand
|
|
+
|
|
spigot {
|
|
enabled = true
|
|
buildDataRef = "42d18d4c4653ffc549778dbe223f6994a031d69e"
|
|
@@ -59,6 +_,7 @@
|
|
libraryRepositories.addAll(
|
|
"https://repo.maven.apache.org/maven2/",
|
|
paperMavenPublicUrl,
|
|
+ bxTeamMavenPublicUrl // DivineMC - Rebrand
|
|
)
|
|
}
|
|
|
|
@@ -122,10 +_,18 @@
|
|
main {
|
|
java { srcDir("../paper-server/src/main/java") }
|
|
resources { srcDir("../paper-server/src/main/resources") }
|
|
+ // DivineMC start - Rebrand
|
|
+ java { srcDir("../purpur-server/src/main/java") }
|
|
+ resources { srcDir("../purpur-server/src/main/resources") }
|
|
+ // DivineMC end - Rebrand
|
|
}
|
|
test {
|
|
java { srcDir("../paper-server/src/test/java") }
|
|
resources { srcDir("../paper-server/src/test/resources") }
|
|
+ // DivineMC start - Rebrand
|
|
+ java { srcDir("../purpur-server/src/test/java") }
|
|
+ resources { srcDir("../purpur-server/src/test/resources") }
|
|
+ // DivineMC end - Rebrand
|
|
}
|
|
}
|
|
val log4jPlugins = sourceSets.create("log4jPlugins") {
|
|
@@ -154,10 +_,22 @@
|
|
}
|
|
|
|
dependencies {
|
|
- implementation(project(":purpur-api")) // Purpur
|
|
+ implementation(project(":divinemc-api")) // DivineMC - Rebrand
|
|
+
|
|
+ // DivineMC start - Dependencies
|
|
+ implementation("org.yaml:snakeyaml:2.3")
|
|
+ implementation ("me.carleslc.Simple-YAML:Simple-Yaml:1.8.4") {
|
|
+ exclude(group="org.yaml", module="snakeyaml")
|
|
+ }
|
|
+ implementation("com.github.luben:zstd-jni:1.5.7-3")
|
|
+ implementation("org.lz4:lz4-java:1.8.0")
|
|
+ implementation("net.openhft:zero-allocation-hashing:0.16")
|
|
+ implementation("org.agrona:agrona:2.2.4")
|
|
+ // DivineMC end - Dependencies
|
|
+
|
|
implementation("ca.spottedleaf:concurrentutil:0.0.5")
|
|
- 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
|
|
+ implementation("org.jline:jline-terminal-ffm:3.29.0") // use ffm on java 22+ // DivineMC - Bump dependencies
|
|
+ implementation("org.jline:jline-terminal-jni:3.29.0") // fall back to jni on java 21 // DivineMC - Bump dependencies
|
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
|
implementation("net.kyori:adventure-text-serializer-ansi")
|
|
|
|
@@ -167,16 +_,16 @@
|
|
all its classes to check if they are plugins.
|
|
Scanning takes about 1-2 seconds so adding this speeds up the server start.
|
|
*/
|
|
- implementation("org.apache.logging.log4j:log4j-core:2.24.1")
|
|
- log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.24.1") // Needed to generate meta for our Log4j plugins
|
|
+ implementation("org.apache.logging.log4j:log4j-core:2.24.3") // DivineMC - Bump dependencies
|
|
+ log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.24.3") // Needed to generate meta for our Log4j plugins // DivineMC - Bump dependencies
|
|
runtimeOnly(log4jPlugins.output)
|
|
alsoShade(log4jPlugins.output)
|
|
|
|
implementation("com.velocitypowered:velocity-native:3.4.0-SNAPSHOT") {
|
|
isTransitive = false
|
|
}
|
|
- implementation("io.netty:netty-codec-haproxy:4.1.118.Final") // Add support for proxy protocol
|
|
- implementation("org.apache.logging.log4j:log4j-iostreams:2.24.1")
|
|
+ implementation("io.netty:netty-codec-haproxy:4.1.119.Final") // Add support for proxy protocol // DivineMC - Bump dependencies
|
|
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.24.3") // DivineMC - Bump dependencies
|
|
implementation("org.ow2.asm:asm-commons:9.8")
|
|
implementation("org.spongepowered:configurate-yaml:4.2.0")
|
|
|
|
@@ -187,7 +_,12 @@
|
|
// 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")
|
|
- runtimeOnly("com.mysql:mysql-connector-j:9.2.0")
|
|
+ // DivineMC start - Bump dependencies
|
|
+ runtimeOnly("com.mysql:mysql-connector-j:9.2.0") {
|
|
+ exclude("com.google.protobuf", "protobuf-java") // exclude outdated version
|
|
+ }
|
|
+ runtimeOnly("com.google.protobuf:protobuf-java:4.30.1")
|
|
+ // DivineMC end - Bump dependencies
|
|
runtimeOnly("com.lmax:disruptor:3.4.4")
|
|
implementation("com.googlecode.json-simple:json-simple:1.1.1") { // change to runtimeOnly once Timings is removed
|
|
isTransitive = false // includes junit
|
|
@@ -196,11 +_,11 @@
|
|
testImplementation("io.github.classgraph:classgraph:4.8.179") // For mob goal test
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.12.2")
|
|
testImplementation("org.junit.platform:junit-platform-suite-engine:1.12.2")
|
|
- testImplementation("org.hamcrest:hamcrest:2.2")
|
|
- testImplementation("org.mockito:mockito-core:5.14.1")
|
|
- mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Configure mockito agent that is needed in newer java versions
|
|
+ testImplementation("org.hamcrest:hamcrest:3.0") // DivineMC - Bump dependencies
|
|
+ testImplementation("org.mockito:mockito-core:5.16.1") // DivineMC - Bump dependencies
|
|
+ mockitoAgent("org.mockito:mockito-core:5.16.1") { isTransitive = false } // Configure mockito agent that is needed in newer java versions // DivineMC - Bump dependencies
|
|
testImplementation("org.ow2.asm:asm-tree:9.8")
|
|
- testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // CartesianTest
|
|
+ testImplementation("org.junit-pioneer:junit-pioneer:2.3.0") // CartesianTest // DivineMC - Bump dependencies
|
|
|
|
implementation("net.neoforged:srgutils:1.0.9") // Mappings handling
|
|
implementation("net.neoforged:AutoRenamingTool:2.0.3") // Remap plugins
|
|
@@ -216,30 +_,42 @@
|
|
implementation("me.lucko:spark-paper:1.10.152")
|
|
}
|
|
|
|
+// DivineMC start - Hide irrelevant compilation warnings
|
|
+tasks.withType<JavaCompile> {
|
|
+ val compilerArgs = options.compilerArgs
|
|
+ compilerArgs.add("-Xlint:-module")
|
|
+ compilerArgs.add("-Xlint:-removal")
|
|
+ compilerArgs.add("-Xlint:-dep-ann")
|
|
+ compilerArgs.add("--add-modules=jdk.incubator.vector")
|
|
+}
|
|
+// DivineMC end - Hide irrelevant compilation warnings
|
|
+
|
|
tasks.jar {
|
|
manifest {
|
|
val git = Git(rootProject.layout.projectDirectory.path)
|
|
val mcVersion = rootProject.providers.gradleProperty("mcVersion").get()
|
|
val build = System.getenv("BUILD_NUMBER") ?: null
|
|
- val buildTime = providers.environmentVariable("BUILD_STARTED_AT").map(Instant::parse).orElse(Instant.EPOCH).get()
|
|
+ val buildTime = Instant.now() // DivineMC - Set build time to current
|
|
val gitHash = git.exec(providers, "rev-parse", "--short=7", "HEAD").get().trim()
|
|
val implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash"
|
|
val date = git.exec(providers, "show", "-s", "--format=%ci", gitHash).get().trim()
|
|
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
|
|
+ val experimental = rootProject.providers.gradleProperty("experimental").get() // DivineMC - Experimental flag
|
|
attributes(
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
- "Implementation-Title" to "Purpur", // Purpur
|
|
+ "Implementation-Title" to "DivineMC", // DivineMC - Rebrand
|
|
"Implementation-Version" to implementationVersion,
|
|
"Implementation-Vendor" to date,
|
|
- "Specification-Title" to "Purpur", // Purpur
|
|
+ "Specification-Title" to "DivineMC", // DivineMC - Rebrand
|
|
"Specification-Version" to project.version,
|
|
- "Specification-Vendor" to "Purpur Team", // Purpur
|
|
- "Brand-Id" to "purpurmc:purpur", // Purpur
|
|
- "Brand-Name" to "Purpur", // Purpur
|
|
+ "Specification-Vendor" to "BX Team", // DivineMC - Rebrand
|
|
+ "Brand-Id" to "bxteam:divinemc", // DivineMC - Rebrand
|
|
+ "Brand-Name" to "DivineMC", // DivineMC - Rebrand
|
|
"Build-Number" to (build ?: ""),
|
|
"Build-Time" to buildTime.toString(),
|
|
"Git-Branch" to gitBranch,
|
|
"Git-Commit" to gitHash,
|
|
+ "Experimental" to experimental, // DivineMC - Experimental flag
|
|
)
|
|
for (tld in setOf("net", "com", "org")) {
|
|
attributes("$tld/bukkit", "Sealed" to true)
|