Skip to content

Commit 62ef250

Browse files
melixdnestoro
authored andcommitted
Fix Windows builds
Windows uses the argFile by default, which highlighted a bug: the arg file was written in the output directory, which was cleaned before running the task (cleaning is necessary or we'd have stale files and up-to-date checking would be broken). The arg file is now written in the temp directory instead.
1 parent f7ad7fa commit 62ef250

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

native-gradle-plugin/src/functionalTest/groovy/org/graalvm/buildtools/gradle/JUnitFunctionalTests.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import org.graalvm.buildtools.gradle.fixtures.AbstractFunctionalTest
4545

4646
class JUnitFunctionalTests extends AbstractFunctionalTest {
4747
def "test if JUint support works with various annotations, reflection and resources"() {
48-
48+
debug=true
4949
given:
5050
withSample("junit-tests")
5151

native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/internal/NativeImageCommandLineProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ public List<String> asArguments() {
234234

235235
List<String> actualCliArgs;
236236
if (useArgFile.getOrElse(true)) {
237-
Path argFileDir = Paths.get(workingDirectory.get());
238-
actualCliArgs = new ArrayList<>(NativeImageUtils.convertToArgsFile(cliArgs, argFileDir, argFileDir));
237+
Path argFileDir = Paths.get(System.getProperty("java.io.tmpdir"));
238+
actualCliArgs = new ArrayList<>(NativeImageUtils.convertToArgsFile(cliArgs, argFileDir, Paths.get(workingDirectory.get())));
239239
} else {
240240
actualCliArgs = cliArgs;
241241
}

0 commit comments

Comments
 (0)