diff --git a/.gitignore b/.gitignore index aca7529..1708ed2 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ run .gradle generated-src *.hprof +testkit diff --git a/build.gradle.kts b/build.gradle.kts index b01fa45..7e9f0a4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -173,6 +173,7 @@ tasks { withType { useJUnitPlatform() + systemProperty("projectDir", projectDir) systemProperty("buildDir", layout.buildDirectory.get().asFile) } diff --git a/src/test/java/org/cthing/gradle/plugins/versioning/PluginIntegTest.java b/src/test/java/org/cthing/gradle/plugins/versioning/PluginIntegTest.java index 4b52651..f6c26f5 100644 --- a/src/test/java/org/cthing/gradle/plugins/versioning/PluginIntegTest.java +++ b/src/test/java/org/cthing/gradle/plugins/versioning/PluginIntegTest.java @@ -29,12 +29,12 @@ public class PluginIntegTest { private static final Path BASE_DIR = Path.of(System.getProperty("buildDir"), "integTest"); - private static final Path WORKING_DIR; + private static final Path WORKING_DIR = Path.of(System.getProperty("projectDir"), "testkit"); static { try { Files.createDirectories(BASE_DIR); - WORKING_DIR = Files.createTempDirectory(BASE_DIR, "working"); + Files.createDirectories(WORKING_DIR); } catch (final IOException ex) { throw new RuntimeException(ex); }