mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
102 lines
4.3 KiB
Diff
102 lines
4.3 KiB
Diff
--- a/purpur-server/build.gradle.kts
|
|
+++ b/purpur-server/build.gradle.kts
|
|
@@ -22,6 +_,7 @@
|
|
// gitFilePatches = true
|
|
|
|
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")
|
|
@@ -29,7 +_,23 @@
|
|
outputDir = rootDirectory.dir("paper-server")
|
|
}
|
|
}
|
|
- activeFork = purpur
|
|
+
|
|
+ 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
|
|
|
|
spigot {
|
|
buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42"
|
|
@@ -115,10 +_,14 @@
|
|
main {
|
|
java { srcDir("../paper-server/src/main/java") }
|
|
resources { srcDir("../paper-server/src/main/resources") }
|
|
+ java { srcDir("../purpur-server/src/main/java") }
|
|
+ resources { srcDir("../purpur-server/src/main/resources") }
|
|
}
|
|
test {
|
|
java { srcDir("../paper-server/src/test/java") }
|
|
resources { srcDir("../paper-server/src/test/resources") }
|
|
+ java { srcDir("../purpur-server/src/test/java") }
|
|
+ resources { srcDir("../purpur-server/src/test/resources") }
|
|
}
|
|
}
|
|
|
|
@@ -142,7 +_,7 @@
|
|
}
|
|
|
|
dependencies {
|
|
- implementation(project(":purpur-api"))
|
|
+ implementation(project(":divinemc-api")) // DivineMC
|
|
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
|
|
@@ -203,26 +_,35 @@
|
|
implementation("me.lucko:spark-paper:1.10.119-SNAPSHOT")
|
|
}
|
|
|
|
+// 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")
|
|
+}
|
|
+// 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 = if (build != null) Instant.now() else Instant.EPOCH
|
|
+ val buildTime = Instant.now() // DivineMC - Build time to current, we dont have a build server rn
|
|
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()
|
|
attributes(
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
- "Implementation-Title" to "Purpur", // Purpur
|
|
+ "Implementation-Title" to "DivineMC", // DivineMC
|
|
"Implementation-Version" to implementationVersion,
|
|
"Implementation-Vendor" to date,
|
|
- "Specification-Title" to "Purpur", // Purpur
|
|
+ "Specification-Title" to "DivineMC", // DivineMC
|
|
"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
|
|
+ "Brand-Id" to "divinemc:divinemc", // DivineMC
|
|
+ "Brand-Name" to "DivineMC", // DivineMC
|
|
"Build-Number" to (build ?: ""),
|
|
"Build-Time" to buildTime.toString(),
|
|
"Git-Branch" to gitBranch,
|