From ec859f1f2f7d52a3479e010c81b0906e497b8f3e Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sat, 12 Jun 2021 19:18:24 -0700 Subject: [PATCH] Add `runWorkDir` property for setting a custom run task working directory --- patches/server/Setup-Gradle-project.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/Setup-Gradle-project.patch b/patches/server/Setup-Gradle-project.patch index dee958478d..883145ba4d 100644 --- a/patches/server/Setup-Gradle-project.patch +++ b/patches/server/Setup-Gradle-project.patch @@ -109,9 +109,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +fun TaskContainer.registerRunTask(name: String, block: JavaExec.() -> Unit): TaskProvider = + register(name) { + group = "Paper" -+ workingDir = rootProject.projectDir.resolve("run") ++ workingDir = layout.projectDirectory.dir(providers.gradleProperty("runWorkDir").orElse("run")).get().asFile + doFirst { -+ if (!workingDir.exists()) workingDir.mkdir() ++ workingDir.mkdirs() + } + standardInput = System.`in` + args("--nogui")