From 405ccf14b04ae72564cd3b49731d64878e98e21c Mon Sep 17 00:00:00 2001 From: Coldsmiles Date: Wed, 14 Oct 2026 08:22:15 +0800 Subject: [PATCH] Update Paper upstream to 26.3 --- README.md | 5 ++-- build.gradle.kts | 2 +- gradle.properties | 6 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- infstar-api/build.gradle.kts | 18 ++++++------ infstar-api/build.gradle.kts.patch | 2 +- infstar-server/build.gradle.kts | 36 ++++++++++++++++-------- infstar-server/build.gradle.kts.patch | 8 +++--- scripts/start-test-server.ps1 | 2 +- scripts/start-test-server.sh | 2 +- 10 files changed, 48 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 816b552..9a4a392 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,9 @@ Paper 是 Infstar 唯一的代码上游。Leaves、Leaf、Purpur 和其他项目 ## 当前基线 -- Minecraft:`26.2` -- Paper commit:`e5fe71723e2ffde7cc9fafc085ac3bb73e63175e` +- Minecraft:`26.3` +- Paper 分支:`main` +- Paper commit:`cc7ee9aebdfc9e4acc3ef8f38c35944872fd1f87` - Java:`25` - 品牌标识:`infstarmc:infstar` - Maven Group:`org.infstarmc.infstar` diff --git a/build.gradle.kts b/build.gradle.kts index 3adfdc2..7fc79f4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { `maven-publish` - id("io.papermc.paperweight.patcher") version "2.0.0-beta.21" + id("io.papermc.paperweight.patcher") version "2.0.0-beta.24" } val paperRepository = "https://repo.papermc.io/repository/maven-public/" diff --git a/gradle.properties b/gradle.properties index 5a89d27..520283b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,10 @@ group=org.infstarmc.infstar -mcVersion=26.2 -apiVersion=26.2 +mcVersion=26.3 +apiVersion=26.3 channel=ALPHA # Paper 是唯一代码上游。跟进 Paper 时应经过审查后再更新此 commit。 -paperCommit=58e6e45d67c998909581f9079189ef51eb6f1267 +paperCommit=cc7ee9aebdfc9e4acc3ef8f38c35944872fd1f87 org.gradle.configuration-cache=true org.gradle.caching=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c61a118..299848b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/infstar-api/build.gradle.kts b/infstar-api/build.gradle.kts index c1a2f83..5ab9f65 100644 --- a/infstar-api/build.gradle.kts +++ b/infstar-api/build.gradle.kts @@ -26,17 +26,17 @@ paperCheckstyle { } */ -val annotationsVersion = "26.0.2" +val annotationsVersion = "26.1.0" val adventureVersion = "5.2.0" val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21" val slf4jVersion = "2.0.17" val log4jVersion = "2.26.0" -val apiAndDocs: Configuration by configurations.creating +val apiAndDocs: Configuration = configurations.create("apiAndDocs") configurations.api { extendsFrom(apiAndDocs) } -val javadocSourcepath: Configuration by configurations.creating { +val javadocSourcepath: Configuration = configurations.create("javadocSourcepath") { attributes { attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION)) attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL)) @@ -61,13 +61,11 @@ dependencies { api("com.google.guava:guava:33.6.0-jre") api("com.google.code.gson:gson:2.14.0") api("org.yaml:snakeyaml:2.2") - api("org.joml:joml:1.10.8") { - isTransitive = false // https://github.com/JOML-CI/JOML/issues/352 - } + api("org.joml:joml:1.10.9") api("it.unimi.dsi:fastutil:8.5.18") api("org.apache.logging.log4j:log4j-api:$log4jVersion") api("org.slf4j:slf4j-api:$slf4jVersion") - api("com.mojang:brigadier:1.3.10") + api("com.mojang:brigadier:1.3.11") // Deprecate bungeecord-chat in favor of adventure api("net.md-5:bungeecord-chat:$bungeeCordChatVersion") { @@ -93,7 +91,7 @@ dependencies { testCompileOnly(annotations) javadocSourcepath(annotations) // For adventure-api module requirements - val checkerQual = "org.checkerframework:checker-qual:3.49.2" + val checkerQual = "org.checkerframework:checker-qual:4.2.3" compileOnlyApi(checkerQual) testCompileOnly(checkerQual) @@ -223,7 +221,7 @@ tasks.withType().configureEach { "https://guava.dev/releases/33.6.0-jre/api/docs/", "https://www.javadocs.dev/org.yaml/snakeyaml/2.2/", "https://www.javadocs.dev/org.jetbrains/annotations/$annotationsVersion/", - "https://www.javadocs.dev/org.joml/joml/1.10.8/", + "https://www.javadocs.dev/org.joml/joml/1.10.9/", "https://www.javadocs.dev/com.google.code.gson/gson/2.14.0", "https://jspecify.dev/docs/api/", "https://jd.papermc.io/adventure/$adventureVersion/", @@ -269,7 +267,7 @@ tasks.compileTestJava { options.compilerArgs.add("-parameters") } -val scanJarForBadCalls by tasks.registering(io.papermc.paperweight.tasks.ScanJarForBadCalls::class) { +val scanJarForBadCalls = tasks.register("scanJarForBadCalls") { badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;") jarToScan.set(tasks.jar.flatMap { it.archiveFile }) classpath.from(configurations.compileClasspath) diff --git a/infstar-api/build.gradle.kts.patch b/infstar-api/build.gradle.kts.patch index f8901b9..5079538 100644 --- a/infstar-api/build.gradle.kts.patch +++ b/infstar-api/build.gradle.kts.patch @@ -23,7 +23,7 @@ } +*/ - val annotationsVersion = "26.0.2" + val annotationsVersion = "26.1.0" val adventureVersion = "5.2.0" @@ -105,10 +_,10 @@ testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.3") diff --git a/infstar-server/build.gradle.kts b/infstar-server/build.gradle.kts index 3b93e7c..2e230ef 100644 --- a/infstar-server/build.gradle.kts +++ b/infstar-server/build.gradle.kts @@ -8,13 +8,13 @@ plugins { `maven-publish` idea id("io.papermc.paperweight.core") - id("io.papermc.fill.gradle") version "1.0.12" + id("io.papermc.fill.gradle") version "1.0.14" } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" dependencies { - mache("io.papermc:mache:26.2+build.1") + mache("io.papermc:mache:26.3+build.1") paperclip("io.papermc:paperclip:3.0.4") } @@ -34,7 +34,7 @@ paperweight { activeFork = infstar updatingMinecraft { - // oldPaperCommit = "d4fe85375af18bfa88f44d7c1e6a61904ae550cc" + //oldPaperCommit = "e5fe71723e2ffde7cc9fafc085ac3bb73e63175e" } } @@ -118,9 +118,9 @@ val log4jPlugins = sourceSets.create("log4jPlugins") { configurations.named(log4jPlugins.compileClasspathConfigurationName) { extendsFrom(configurations.compileClasspath.get()) } -val alsoShade: Configuration by configurations.creating +val alsoShade: Configuration = configurations.create("alsoShade") -val runtimeConfiguration by configurations.consumable("runtimeConfiguration") { +configurations.consumable("runtimeConfiguration") { attributes.attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME)) extendsFrom(configurations.getByName(sourceSets.main.get().runtimeElementsConfigurationName)) } @@ -138,9 +138,11 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider { dependencies { implementation(project(":infstar-api")) - implementation("ca.spottedleaf:leafpile:1.2.0") - 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(platform("ca.spottedleaf.leafpile:bom:1.2.4")) + implementation("ca.spottedleaf.leafpile:common") + implementation("ca.spottedleaf.leafpile:concurrentutil") + implementation("ca.spottedleaf.leafpile:converter") + implementation("org.jline:jline-terminal-ffm:4.4.6") implementation("net.minecrell:terminalconsoleappender:1.3.0") implementation("net.kyori:adventure-text-serializer-ansi") @@ -158,7 +160,7 @@ dependencies { implementation("com.velocitypowered:velocity-native:4.1.0") { isTransitive = false } - implementation("io.netty:netty-codec-haproxy:4.2.15.Final") // Add support for proxy protocol + implementation("io.netty:netty-codec-haproxy:4.2.16.Final") // Add support for proxy protocol implementation("org.apache.logging.log4j:log4j-iostreams:2.26.0") implementation("org.ow2.asm:asm-commons:9.9.1") implementation("org.spongepowered:configurate-yaml:4.2.0") @@ -184,7 +186,7 @@ dependencies { // Spark implementation("me.lucko:spark-api:0.1-20240720.200737-2") - implementation("me.lucko:spark-paper:1.10.180") + implementation("me.lucko:spark-paper:1.10.191") } tasks.jar { @@ -235,7 +237,7 @@ tasks.withType().configureEach { options.forkOptions.memoryMaximumSize = "1G" } -val scanJarForBadCalls by tasks.registering(io.papermc.paperweight.tasks.ScanJarForBadCalls::class) { +val scanJarForBadCalls = tasks.register("scanJarForBadCalls") { badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;") jarToScan.set(tasks.jar.flatMap { it.archiveFile }) classpath.from(configurations.compileClasspath) @@ -270,6 +272,16 @@ tasks.test { val provider = objects.newInstance() provider.fileCollection.from(mockitoAgent) jvmArgumentProviders.add(provider) + + // Hides repeated jline/joml warnings due to forking + jvmArgs("--enable-native-access=ALL-UNNAMED") + systemProperty("joml.nounsafe", true) +} + +tasks.withType().configureEach { + extraManifestMainAttributes = mapOf( + "Enable-Native-Access" to "ALL-UNNAMED", + ) } val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath() @@ -315,8 +327,10 @@ fun TaskContainer.registerRunTask( systemProperty("disable.watchdog", true) } systemProperty("io.papermc.paper.suppress.sout.nags", true) + systemProperty("paper.alwaysPrintWarningState", true) systemProperty("paper.maxChatCommandInputSize", 32767) systemProperty("paper.disableMigrationDelay", true) + systemProperty("joml.nounsafe", true) systemProperty("paper.updatingMinecraft", providers.gradleProperty("updatingMinecraft").getOrElse("false").toBoolean()) val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2") diff --git a/infstar-server/build.gradle.kts.patch b/infstar-server/build.gradle.kts.patch index e48344a..3d0305e 100644 --- a/infstar-server/build.gradle.kts.patch +++ b/infstar-server/build.gradle.kts.patch @@ -16,7 +16,7 @@ + activeFork = infstar + updatingMinecraft { - // oldPaperCommit = "d4fe85375af18bfa88f44d7c1e6a61904ae550cc" + //oldPaperCommit = "e5fe71723e2ffde7cc9fafc085ac3bb73e63175e" } @@ -86,7 +_,24 @@ } @@ -50,9 +50,9 @@ dependencies { - implementation(project(":paper-api")) + implementation(project(":infstar-api")) - implementation("ca.spottedleaf:leafpile:1.2.0") - 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(platform("ca.spottedleaf.leafpile:bom:1.2.4")) + implementation("ca.spottedleaf.leafpile:common") + implementation("ca.spottedleaf.leafpile:concurrentutil") @@ -163,23 +_,21 @@ manifest { val git = Git(rootProject.layout.projectDirectory.path) diff --git a/scripts/start-test-server.ps1 b/scripts/start-test-server.ps1 index 54ce82b..bff2b6f 100644 --- a/scripts/start-test-server.ps1 +++ b/scripts/start-test-server.ps1 @@ -13,7 +13,7 @@ if (-not (Test-Path -LiteralPath $serverJar -PathType Leaf)) { $java = Get-Command java -ErrorAction SilentlyContinue if ($null -eq $java) { - throw "未找到 Java。Infstar 26.2 需要 Java 25。" + throw "未找到 Java。Infstar 26.3 需要 Java 25。" } Push-Location $runDirectory diff --git a/scripts/start-test-server.sh b/scripts/start-test-server.sh index 33f05b7..9c49bc6 100644 --- a/scripts/start-test-server.sh +++ b/scripts/start-test-server.sh @@ -14,7 +14,7 @@ if [[ ! -f "$server_jar" ]]; then fi if ! command -v "$java_command" >/dev/null 2>&1; then - echo "未找到 Java。Infstar 26.2 需要 Java 25。" >&2 + echo "未找到 Java。Infstar 26.3 需要 Java 25。" >&2 exit 1 fi