9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-19 15:09:27 +00:00
Files
SparklyPaperMC/sparklypaper-server/build.gradle.kts.patch
MrPowerGamerBR af3b1442a9 Update to Paper 1.21.5
Not all patches are migrated yet, I'm commiting right now to avoid losing my progress

This time I've moved the patches to file patches instead of feature patches, this DOES NOT include the parallel world ticking patch yet
2025-05-25 20:24:39 -03:00

102 lines
3.9 KiB
Diff

--- a/paper-server/build.gradle.kts
+++ b/paper-server/build.gradle.kts
@@ -7,6 +_,8 @@
plugins {
`java-library`
+ kotlin("jvm") version "2.1.21"
+ kotlin("plugin.serialization") version "2.1.21"
`maven-publish`
idea
id("io.papermc.paperweight.core")
@@ -24,6 +_,17 @@
minecraftVersion = providers.gradleProperty("mcVersion")
gitFilePatches = false
+ 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
+
//updatingMinecraft {
// oldPaperCommit = "f4f275519f7c1fbe9db173b7144a4fe81440e365"
//}
@@ -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 +_,12 @@
}
dependencies {
- implementation(project(":paper-api"))
+ // SparklyPaper start
+ implementation(project(":sparklypaper-api"))
+ implementation(kotlin("reflect"))
+ implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")
+ implementation("com.charleskorn.kaml:kaml:0.78.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())