Resolve run working directory from rootProject

This commit is contained in:
Jason Penilla 2021-06-12 20:35:03 -07:00
parent 06f41a4885
commit 2a3f1fa30c
No known key found for this signature in database
GPG Key ID: 0E75A301420E48F8
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ index 67fb370cad6924895a6b27052dbd5c1767e3f0c9..3e05459f27c4c5697ae65da504d67a6a
/.project
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000000000000000000000000000000000000..29564703bd1502269c04cd5fb3070b687ca51af5
index 0000000000000000000000000000000000000000..21b97f37a4c4d35d80bc1c1b98f55bcfb8d21f20
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,121 @@
@ -107,7 +107,7 @@ index 0000000000000000000000000000000000000000..29564703bd1502269c04cd5fb3070b68
+fun TaskContainer.registerRunTask(name: String, block: JavaExec.() -> Unit): TaskProvider<JavaExec> =
+ register<JavaExec>(name) {
+ group = "Paper"
+ workingDir = layout.projectDirectory.dir(
+ workingDir = rootProject.layout.projectDirectory.dir(
+ providers.gradleProperty("runWorkDir").forUseAtConfigurationTime().orElse("run")
+ ).get().asFile
+ doFirst {