From 320f7fb2b13cccd41d44a33919241b97cb9e918c Mon Sep 17 00:00:00 2001 From: Sebastian Davids Date: Tue, 2 Apr 2024 11:31:43 +0200 Subject: [PATCH] Use quarkusDev#workingDirectory fix #39798 Signed-off-by: Sebastian Davids --- docs/src/main/asciidoc/gradle-tooling.adoc | 4 ++-- .../main/resources/custom-config-java-module/build.gradle | 2 +- .../src/main/resources/custom-working-dir-app/build.gradle | 2 +- .../main/resources/dotenv-config-java-module/build.gradle | 6 ++++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/src/main/asciidoc/gradle-tooling.adoc b/docs/src/main/asciidoc/gradle-tooling.adoc index cb8947cc31c00..7871b6a2729e7 100644 --- a/docs/src/main/asciidoc/gradle-tooling.adoc +++ b/docs/src/main/asciidoc/gradle-tooling.adoc @@ -183,7 +183,7 @@ You can change the working directory the development environment runs on: [source,groovy] ---- quarkusDev { - workingDir = rootProject.projectDir + workingDirectory = rootProject.layout.projectDirectory.asFile } ---- **** @@ -194,7 +194,7 @@ quarkusDev { [source,kotlin] ---- tasks.quarkusDev { - workingDir = rootProject.projectDir.toString() + workingDirectory = rootProject.layout.projectDirectory.asFile } ---- **** diff --git a/integration-tests/gradle/src/main/resources/custom-config-java-module/build.gradle b/integration-tests/gradle/src/main/resources/custom-config-java-module/build.gradle index 82794ca12811a..a3bc0d4a865be 100644 --- a/integration-tests/gradle/src/main/resources/custom-config-java-module/build.gradle +++ b/integration-tests/gradle/src/main/resources/custom-config-java-module/build.gradle @@ -31,7 +31,7 @@ compileTestJava { } quarkusDev { - workingDir = "./build" + workingDirectory = layout.buildDirectory.asFile } quarkusBuild { diff --git a/integration-tests/gradle/src/main/resources/custom-working-dir-app/build.gradle b/integration-tests/gradle/src/main/resources/custom-working-dir-app/build.gradle index 0eef857a7645b..5f40739890804 100644 --- a/integration-tests/gradle/src/main/resources/custom-working-dir-app/build.gradle +++ b/integration-tests/gradle/src/main/resources/custom-working-dir-app/build.gradle @@ -17,7 +17,7 @@ repositories { } quarkusDev { - workingDir = rootProject.projectDir + workingDirectory = rootProject.layout.projectDirectory.asFile } dependencies { diff --git a/integration-tests/gradle/src/main/resources/dotenv-config-java-module/build.gradle b/integration-tests/gradle/src/main/resources/dotenv-config-java-module/build.gradle index 9da621266cf25..55b148110d3ae 100644 --- a/integration-tests/gradle/src/main/resources/dotenv-config-java-module/build.gradle +++ b/integration-tests/gradle/src/main/resources/dotenv-config-java-module/build.gradle @@ -1,3 +1,5 @@ +import static java.nio.file.Files.createTempDirectory + plugins { id 'java' id 'io.quarkus' @@ -31,9 +33,9 @@ compileTestJava { } quarkusDev { - workingDir = System.getProperty("java.io.tmpdir") + workingDirectory = createTempDirectory("").toFile() } test { systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager" -} \ No newline at end of file +}