| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dd650d36-9c97-4ca4-9ec8-39b37f99a07c
There was a problem hiding this comment.
This PR adds a new multiline cache-path input to let users override the dependency cache locations used by setup-java’s built-in caching for Maven/Gradle/sbt, while keeping existing defaults and cache-key behavior when the input is omitted.
Changes:
| File | Description |
|---|---|
| src/setup-java.ts | Reads cache-path as multiline input and passes it to cache restore. |
| src/constants.ts | Defines the new INPUT_CACHE_PATH constant. |
| src/cache.ts | Adds cache path resolution + state persistence; uses resolved paths for restore/save. |
| README.md | Documents cache-path behavior and provides usage example(s). |
| action.yml | Declares the new cache-path input. |
| .github/workflows/e2e-cache.yml | Adds an E2E round-trip job validating a custom Maven repository cache path. |
| tests/setup-java.test.ts | Verifies orchestration passes cache-path through to cache.restore. |
| tests/cache.test.ts | Adds coverage for restoring/persisting/saving custom cache paths across package managers. |
| dist/setup/index.js | Updates the packaged action bundle for the setup entrypoint. |
| dist/cleanup/index.js | Updates the packaged action bundle for the post-job cleanup/save entrypoint. |
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dd650d36-9c97-4ca4-9ec8-39b37f99a07c
Align the custom cache save and restore key inputs and use the workflow hash to avoid a previously populated cache entry. Rebuild the distribution bundles. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dd650d36-9c97-4ca4-9ec8-39b37f99a07c
| Back | FazBrowse Home | New Git URL |
Description:
Users can relocate Maven, Gradle, and sbt dependency caches, but setup-java's built-in caching previously used only hardcoded locations. This adds a multiline cache-path input that replaces the selected package manager's main dependency paths while preserving existing defaults and cache-key computation when omitted.
The resolved paths are persisted from restore to the post-job save so both phases use identical locations. Maven and Gradle wrapper caches remain independently managed at their existing paths. Unit tests cover all supported package managers, multiline exclusions, setup wiring, and restore/save consistency; the cache E2E workflow now verifies a custom Maven repository round trip. Documentation explains build-tool configuration, key behavior, and when to use actions/cache directly.
Related issue:
Fixes: #1173
Check list: