Fixes #754
What changed
This PR adds regression coverage for Windows args-file path handling in the shared common utilities.
Before this change, the implementation already aimed to avoid relativizing paths across different Windows roots, but there was no focused regression coverage proving that behavior.
After this change, the shared args-file conversion logic is covered by Windows-root regression tests for both same-root and cross-root cases.
Why
Path handling bugs at this layer affect both Gradle and Maven native-image invocation. Adding regression coverage here protects shared behavior without relying on a Windows machine or a full product-level reproduction.
Example
Before:
A Windows args-file path on the same drive and one on a different drive were both handled by the same shared utility path logic, but only manual reasoning or ad hoc testing could confirm whether the cross-root case stayed absolute.
After:
The shared utility now has Jimfs-backed Windows regression coverage verifying that same-root paths can be relativized while cross-root paths remain absolute.
Implementation summary
- Keep
NativeImageUtils.convertToArgsFile on Path and Files APIs so it can be exercised with alternate file-system providers.
- Add Jimfs-backed Windows filesystem tests covering same-root relative args-file paths and cross-root absolute args-file paths.
- Add Jimfs as a test-only dependency for the common utilities module.
Validation
grund check
grund fmt . --marker --check
git diff --check
JAVA_HOME=$HOME/.sdkman/candidates/java/17.0.12-graal ./gradlew :utils:test --tests org.graalvm.buildtools.utils.NativeImageUtilsTest --rerun-tasks
JAVA_HOME=$HOME/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:test :native-gradle-plugin:inspections