mirror of
https://github.com/SparklyPower/SparklyPaper.git
synced 2025-12-19 15:09:27 +00:00
95 lines
3.6 KiB
Diff
95 lines
3.6 KiB
Diff
--- a/paper-server/build.gradle.kts
|
|
+++ b/paper-server/build.gradle.kts
|
|
@@ -4,6 +_,8 @@
|
|
|
|
plugins {
|
|
`java-library`
|
|
+ kotlin("jvm") version "2.0.0"
|
|
+ kotlin("plugin.serialization") version "2.0.0"
|
|
`maven-publish`
|
|
id("io.papermc.paperweight.core")
|
|
}
|
|
@@ -21,6 +_,21 @@
|
|
// macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java")
|
|
// gitFilePatches = true
|
|
|
|
+ val fork = forks.register("sparklypaper") {
|
|
+ upstream.patchDir("paperServer") {
|
|
+ upstreamPath = "paper-server"
|
|
+ excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
|
|
+ patchesDir = rootDirectory.dir("sparklypaper-server/paper-patches")
|
|
+ outputDir = rootDirectory.dir("paper-server")
|
|
+ }
|
|
+ }
|
|
+
|
|
+ activeFork = fork
|
|
+
|
|
+ paper {
|
|
+ paperServerDir = upstreamsDirectory().map { it.dir("paper/paper-server") }
|
|
+ }
|
|
+
|
|
spigot {
|
|
buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42"
|
|
packageVersion = "v1_21_R3" // also needs to be updated in MappingEnvironment
|
|
@@ -101,7 +_,20 @@
|
|
}
|
|
}
|
|
|
|
-val log4jPlugins = sourceSets.create("log4jPlugins")
|
|
+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") }
|
|
+}
|
|
configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
|
extendsFrom(configurations.compileClasspath.get())
|
|
}
|
|
@@ -119,7 +_,12 @@
|
|
}
|
|
|
|
dependencies {
|
|
- implementation(project(":paper-api"))
|
|
+ // SparklyPaper start
|
|
+ implementation(project(":sparklypaper-api"))
|
|
+ implementation(kotlin("reflect"))
|
|
+ implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
|
|
+ implementation("com.charleskorn.kaml:kaml:0.55.0")
|
|
+ // SparklyPaper end
|
|
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
|
|
@@ -183,7 +_,12 @@
|
|
val build = System.getenv("BUILD_NUMBER") ?: null
|
|
val buildTime = if (build != null) Instant.now() else Instant.EPOCH
|
|
val gitHash = git.exec(providers, "rev-parse", "--short=7", "HEAD").get().trim()
|
|
- val implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash"
|
|
+ // SparklyPaper start
|
|
+ var implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash"
|
|
+ if (project.hasProperty("sparklypaperImplementationVersionSuffix")) {
|
|
+ implementationVersion += "/${project.property("sparklypaperImplementationVersionSuffix")}"
|
|
+ }
|
|
+ // SparklyPaper end
|
|
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(
|
|
@@ -194,8 +_,8 @@
|
|
"Specification-Title" to "Paper",
|
|
"Specification-Version" to project.version,
|
|
"Specification-Vendor" to "Paper Team",
|
|
- "Brand-Id" to "papermc:paper",
|
|
- "Brand-Name" to "Paper",
|
|
+ "Brand-Id" to "sparklypower:sparklypaper", // SparklyPaper
|
|
+ "Brand-Name" to "SparklyPaper", // SparklyPaper
|
|
"Build-Number" to (build ?: ""),
|
|
"Build-Time" to buildTime.toString(),
|
|
"Git-Branch" to gitBranch,
|