Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

jarFiles @InputFile missing @PathSensitivity to make build-cache effective #438

Open
nhoughto opened this issue Jun 15, 2021 · 1 comment

Comments

@nhoughto
Copy link

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.

@nhoughto
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant