Include gradle.properties in Gradle cache key - #1225
Open
jdubois wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the default Gradle dependency cache key inputs to include **/gradle.properties, ensuring that changes to Gradle properties affecting dependency/plugin/repository resolution will correctly rotate the primary cache key in actions/setup-java.
Changes:
- Add
**/gradle.propertiesto the default Gradle dependency-cache hashing patterns. - Update README documentation to reflect the new default Gradle key inputs.
- Update generated
distbundles and add a test asserting the cache key changes when onlygradle.propertieschanges.
Show a summary per file
| File | Description |
|---|---|
| src/cache.ts | Adds **/gradle.properties to the default Gradle dependency-cache key hash inputs. |
| README.md | Documents **/gradle.properties as part of the default Gradle key inputs. |
| dist/setup/377.index.js | Updates compiled setup bundle to include **/gradle.properties in Gradle patterns. |
| dist/cleanup/377.index.js | Updates compiled cleanup bundle to include **/gradle.properties in Gradle patterns. |
| tests/cache.test.ts | Updates existing Gradle-pattern assertions and adds a regression test for key rotation on gradle.properties changes. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/5 changed files
- Comments generated: 0
- Review effort level: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Include
**/gradle.propertiesin the default Gradle dependency-cache hash inputs so changes to dependency, plugin, or repository properties produce a new primary cache key.This keeps the change focused on
gradle.properties, updates the documented defaults and generateddistbundles, and adds a behavior test showing that changing onlygradle.propertieschanges the computed key.Prior art: #460 was closed after becoming stale and conflicted; maintainers invited a fresh focused PR.
Tests:
node --experimental-vm-modules ./node_modules/jest/bin/jest.js --runInBand __tests__/cache.test.tsnpm run checkRelated issue:
Fixes #1222
Check list:
npm run checklocally (format, lint, build, test) and all checks pass.