Build updates

This commit is contained in:
Jason Penilla 2022-10-31 15:25:30 -07:00
parent 93b2246851
commit 4a9c9b3fb0
No known key found for this signature in database
GPG Key ID: 0E75A301420E48F8
10 changed files with 31 additions and 57 deletions

View File

@ -5,7 +5,7 @@ plugins {
java java
`maven-publish` `maven-publish`
id("com.github.johnrengelman.shadow") version "7.1.2" apply false id("com.github.johnrengelman.shadow") version "7.1.2" apply false
id("io.papermc.paperweight.core") version "1.3.8" id("io.papermc.paperweight.core") version "1.3.9"
} }
allprojects { allprojects {
@ -62,7 +62,7 @@ repositories {
dependencies { dependencies {
paramMappings("net.fabricmc:yarn:1.19.2+build.1:mergedv2") paramMappings("net.fabricmc:yarn:1.19.2+build.1:mergedv2")
remapper("net.fabricmc:tiny-remapper:0.8.2:fat") remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
decompiler("net.minecraftforge:forgeflower:1.5.605.7") decompiler("net.minecraftforge:forgeflower:1.5.605.7")
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6") spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6")
paperclip("io.papermc:paperclip:3.0.2") paperclip("io.papermc:paperclip:3.0.2")

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

6
gradlew vendored
View File

@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \ org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args. # Use "xargs" to parse quoted args.
# #
# With -n1 it outputs one arg per line, with the quotes and backslashes removed. # With -n1 it outputs one arg per line, with the quotes and backslashes removed.

14
gradlew.bat vendored
View File

@ -14,7 +14,7 @@
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@ -6,17 +6,10 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index e260462933a9f7065b2360e6bf9e4ee56069a705..a1a8c4778742584125d6084fa761b1bc86f6a842 100644 index e260462933a9f7065b2360e6bf9e4ee56069a705..2ff278cdc3dfef4644b12755be2e3a69a43e1f07 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -1,4 +1,6 @@ @@ -19,12 +19,14 @@ dependencies {
+import io.papermc.paperweight.tasks.BaseTask
import io.papermc.paperweight.util.*
+import java.nio.file.Files
plugins {
java
@@ -19,12 +21,14 @@ dependencies {
Scanning takes about 1-2 seconds so adding this speeds up the server start. Scanning takes about 1-2 seconds so adding this speeds up the server start.
*/ */
implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
@ -31,42 +24,15 @@ index e260462933a9f7065b2360e6bf9e4ee56069a705..a1a8c4778742584125d6084fa761b1bc
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
runtimeOnly("mysql:mysql-connector-java:8.0.29") runtimeOnly("mysql:mysql-connector-java:8.0.29")
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
@@ -104,6 +108,45 @@ tasks.check { @@ -104,6 +106,18 @@ tasks.check {
} }
// Paper end // Paper end
+// Paper start - include reobf mappings in jar for stacktrace deobfuscation +// Paper start - include reobf mappings in jar for stacktrace deobfuscation
+abstract class IncludeMappings : BaseTask() { +val includeMappings = tasks.register<io.papermc.paperweight.tasks.IncludeMappings>("includeMappings") {
+ @get:InputFile
+ abstract val inputJar: RegularFileProperty
+
+ @get:InputFile
+ abstract val mappings: RegularFileProperty
+
+ @get:OutputFile
+ abstract val outputJar: RegularFileProperty
+
+ override fun init() {
+ super.init()
+ outputJar.convention(defaultOutput())
+ }
+
+ @TaskAction
+ private fun addMappings() {
+ outputJar.get().asFile.parentFile.mkdirs()
+ inputJar.get().asFile.copyTo(outputJar.get().asFile, overwrite = true)
+ outputJar.get().path.openZip().use { fs ->
+ val dir = fs.getPath("META-INF/mappings/")
+ Files.createDirectories(dir)
+ val target = dir.resolve("reobf.tiny")
+ Files.copy(mappings.path, target)
+ }
+ }
+}
+
+val includeMappings = tasks.register<IncludeMappings>("includeMappings") {
+ inputJar.set(tasks.fixJarForReobf.flatMap { it.outputJar }) + inputJar.set(tasks.fixJarForReobf.flatMap { it.outputJar })
+ mappings.set(tasks.reobfJar.flatMap { it.mappingsFile }) + mappings.set(tasks.reobfJar.flatMap { it.mappingsFile })
+ mappingsDest.set("META-INF/mappings/reobf.tiny")
+} +}
+ +
+tasks.reobfJar { +tasks.reobfJar {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Implement Mob Goal API
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index a1a8c4778742584125d6084fa761b1bc86f6a842..a02f53c6ee0111e07d78a718a6ca0ec708f70cfc 100644 index 2ff278cdc3dfef4644b12755be2e3a69a43e1f07..2d1e639bd2880469d849ca1242184b0af1f6903c 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -37,6 +37,7 @@ dependencies { @@ -35,6 +35,7 @@ dependencies {
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3") runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3") runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
@ -789,7 +789,7 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31
LOOK, LOOK,
JUMP, JUMP,
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9cf007fae9aa21897a06de783357f5e14f6004a0..547bb2aab1c31cbd2d571a995c1014726993b39f 100644 index 8d4388df7e62016df262e377e5f75cc44e17e284..f1134bce181e8ea5eebb241e3af9691390cd2533 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2691,5 +2691,11 @@ public final class CraftServer implements Server { @@ -2691,5 +2691,11 @@ public final class CraftServer implements Server {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Use Velocity compression and cipher natives
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index a02f53c6ee0111e07d78a718a6ca0ec708f70cfc..30a600ef1dfedc1a050268af593074659382bc36 100644 index 2d1e639bd2880469d849ca1242184b0af1f6903c..88000dae363f55044f86e72e9f6fb0214cd320bc 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -29,6 +29,11 @@ dependencies { @@ -27,6 +27,11 @@ dependencies {
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
implementation("commons-lang:commons-lang:2.6") implementation("commons-lang:commons-lang:2.6")
implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Update Log4j
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index 30a600ef1dfedc1a050268af593074659382bc36..039891cc7ffd355f2d4c1cd202a042bf061ddfa8 100644 index 88000dae363f55044f86e72e9f6fb0214cd320bc..ea1faaf4820059b4a67dbd229a90bc6b78b861bc 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -20,10 +20,11 @@ dependencies { @@ -18,10 +18,11 @@ dependencies {
all its classes to check if they are plugins. all its classes to check if they are plugins.
Scanning takes about 1-2 seconds so adding this speeds up the server start. Scanning takes about 1-2 seconds so adding this speeds up the server start.
*/ */

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add support for Proxy Protocol
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index 039891cc7ffd355f2d4c1cd202a042bf061ddfa8..44e0f265432487fe5c3c00c5245041298ade16a0 100644 index ea1faaf4820059b4a67dbd229a90bc6b78b861bc..b0e4f11e8af4b909a56bb5576d05ef0537fb25f7 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -22,6 +22,7 @@ dependencies { @@ -20,6 +20,7 @@ dependencies {
*/ */
implementation("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - implementation implementation("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - implementation
annotationProcessor("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - Needed to generate meta for our Log4j plugins annotationProcessor("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - Needed to generate meta for our Log4j plugins