gradle-graal
gradle-graal copied to clipboard
jarFiles @InputFile missing @PathSensitivity to make build-cache effective
jarFiles currently defined as:
@InputFile
public final Provider<RegularFile> getJarFiles() {
return jarFile;
}
The default for @InputFile is PathSensitivity of ABSOLUTE, which means if any part of the file path changes, it breaks build caching, which is a strong possibility, esp for CI where the path may have a random element to it.
Adding @PathSensitive(PathSensitivity.RELATIVE) is the easy solution.
There are a few other inputs that force rebuilds too:
windowsVsVarsPath
architectureSpecifiedOutputExtension
executable
cacheDir
I've marked all these as @Internal in my fork and gradle will honour build-cache results as expected.