mirror of
https://github.com/SparklyPower/SparklyPaper.git
synced 2026-01-04 15:41:34 +00:00
Yes, the update is COMPLETELY borked, there are broken patches, it does not compile, there are even diff conflict things inside of patches This is still very unfinished and you should not use it
103 lines
4.0 KiB
Diff
103 lines
4.0 KiB
Diff
--- a/paper-server/build.gradle.kts
|
|
+++ b/paper-server/build.gradle.kts
|
|
@@ -7,6 +_,8 @@
|
|
|
|
plugins {
|
|
`java-library`
|
|
+ kotlin("jvm") version "2.0.0"
|
|
+ kotlin("plugin.serialization") version "2.0.0"
|
|
`maven-publish`
|
|
idea
|
|
id("io.papermc.paperweight.core")
|
|
@@ -28,6 +_,17 @@
|
|
// oldPaperCommit = "f4f275519f7c1fbe9db173b7144a4fe81440e365"
|
|
//}
|
|
|
|
+ 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
|
|
+
|
|
spigot {
|
|
buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc"
|
|
packageVersion = "v1_21_R4" // also needs to be updated in MappingEnvironment
|
|
@@ -108,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())
|
|
}
|
|
@@ -130,7 +_,13 @@
|
|
}
|
|
|
|
dependencies {
|
|
- implementation(project(":paper-api"))
|
|
+ implementation(project(":sparklypaper-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
|
|
@@ -201,9 +_,14 @@
|
|
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"
|
|
+ var implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash" // SparklyPaper
|
|
val date = git.exec(providers, "show", "-s", "--format=%ci", gitHash).get().trim()
|
|
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
|
|
+ // SparklyPaper start
|
|
+ if (project.hasProperty("sparklypaperImplementationVersionSuffix")) {
|
|
+ implementationVersion += "/${project.property("sparklypaperImplementationVersionSuffix")}"
|
|
+ }
|
|
+ // SparklyPaper end
|
|
attributes(
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
"Implementation-Title" to "Paper",
|
|
@@ -212,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,
|
|
@@ -267,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 = rootProject.layout.projectDirectory.dir("paper-server/src/generated/java").asFile.toPath()
|
|
idea {
|
|
module {
|
|
generatedSourceDirs.add(generatedDir.toFile())
|