aboutsummaryrefslogtreecommitdiffhomepage
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorJason Penilla <[email protected]>2024-04-23 11:44:28 -0700
committerJason Penilla <[email protected]>2024-04-23 11:44:42 -0700
commit380c4d2313d303f2174b435a8c88a4a813b10ba4 (patch)
tree3a22599633ae6868fe203669ac4be8406efb6e83 /build.gradle.kts
parentef057bba7d2522b73dce50be95cbacd4e84d8099 (diff)
downloadPaper-380c4d2313d303f2174b435a8c88a4a813b10ba4.tar.gz
Paper-380c4d2313d303f2174b435a8c88a4a813b10ba4.zip
Add plugin remapping patches
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts8
1 files changed, 7 insertions, 1 deletions
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<String>
+ @get:Input
+ abstract val patchedDir: Property<String>
+
private fun unapplied(): List<Path> =
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)