13
0
geforkt von Mirrors/Paper

Add runWorkDir property for setting a custom run task working directory

Dieser Commit ist enthalten in:
Jason Penilla 2021-06-12 19:18:24 -07:00
Ursprung 3a7b3b35c3
Commit ec859f1f2f

Datei anzeigen

@ -109,9 +109,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+fun TaskContainer.registerRunTask(name: String, block: JavaExec.() -> Unit): TaskProvider<JavaExec> =
+ register<JavaExec>(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")