Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant