From 380c4d2313d303f2174b435a8c88a4a813b10ba4 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 23 Apr 2024 11:44:28 -0700 Subject: Add plugin remapping patches --- build.gradle.kts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'build.gradle.kts') diff --git a/build.gradle.kts b/build.gradle.kts index 803c1d07c8..1c49486c94 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "8.1.1" apply false - id("io.papermc.paperweight.core") version "1.5.15" + id("io.papermc.paperweight.core") version "1.6.0-SNAPSHOT" } allprojects { @@ -166,6 +166,7 @@ if (providers.gradleProperty("updatingMinecraft").getOrElse("false").toBoolean() appliedPatches = file("patches/server") unappliedPatches = file("patches/unapplied/server") applyTaskName = "applyServerPatches" + patchedDir = "Paper-Server" } } @@ -183,6 +184,9 @@ abstract class RebasePatches : BaseTask() { @get:Input abstract val applyTaskName: Property + @get:Input + abstract val patchedDir: Property + private fun unapplied(): List = unappliedPatches.path.listDirectoryEntries("*.patch").sortedBy { it.name } @@ -245,6 +249,8 @@ abstract class RebasePatches : BaseTask() { } } + // Delete the build file before resetting the AM session in case it has compilation errors + projectDir.path.resolve(patchedDir.get()).resolve("build.gradle.kts").deleteIfExists() // Apply again to reset the am session (so it ends on the failed patch, to allow us to rebuild after fixing it) val apply2 = ProcessBuilder() .directory(projectDir.path) -- cgit v1.2.3