Commit 2235aeb
committed
Fix jarFileTest cache relocatability
The jarFileTest task sets `systemProperty("jarFile", absolutePath)` which
embeds an absolute path as a task input, making the task not
cache-relocatable across different project locations.
Fix by:
- Using `inputs.files(shadowJar).withPathSensitivity(RELATIVE)` instead
of the bare `file()` call (which doesn't register a proper input)
- Passing the jar path as a relative path to the system property
The test (AbstractJarFileTest) uses `Paths.get(System.getProperty("jarFile"))`
which resolves relative paths against the working directory (project dir),
so the test works identically with both absolute and relative paths.1 parent 0bb0b2b commit 2235aeb
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments