Skip to content

Include gradle.properties in Gradle cache key - #1225

Open
jdubois wants to merge 1 commit into
actions:mainfrom
jdubois:jdubois-include-gradle-properties-cache-key
Open

Include gradle.properties in Gradle cache key#1225
jdubois wants to merge 1 commit into
actions:mainfrom
jdubois:jdubois-include-gradle-properties-cache-key

Conversation

@jdubois

@jdubois jdubois commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description:
Include **/gradle.properties in 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 generated dist bundles, and adds a behavior test showing that changing only gradle.properties changes 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.ts
  • npm run check

Related issue:
Fixes #1222

Check list:

  • Ran npm run check locally (format, lint, build, test) and all checks pass.
  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jdubois
jdubois requested a review from a team as a code owner August 6, 2026 08:14
Copilot AI lite review requested due to automatic review settings August 6, 2026 08:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.properties to the default Gradle dependency-cache hashing patterns.
  • Update README documentation to reflect the new default Gradle key inputs.
  • Update generated dist bundles and add a test asserting the cache key changes when only gradle.properties changes.
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

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

Successfully merging this pull request may close these issues.

Gradle dependency cache key should include gradle.properties

2 participants