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

Add ~/.gradle/jdks to cache #245

Closed
devminded opened this issue Nov 2, 2021 · 2 comments
Closed

Add ~/.gradle/jdks to cache #245

devminded opened this issue Nov 2, 2021 · 2 comments
Labels
feature request New feature or request to improve the current logic

Comments

@devminded
Copy link

Description:
Convenience: Be able to cache JDKs for projects that uses the built in toolchain support in Gradle.

Having the action configure cache for ~/.gradle/jdks (perhaps under a different cache-key?) in addition to .gradle/caches, .gradle/wrapper and gradle-wrapper.properties would avoid the unnecessary step of:

- name: Setup gradle JDK cache
  uses: actions/cache@v2
  with:
    path: ~/.gradle/jdks
    key: gradle-${{ runner.os }}-jdks

Justification:
Many of us have complicated multi-module builds targeting different JDK versions. For this Gradle supports toolchains that manages and downloads JDKs on demand if the required JDK versions are not found on the path. Using cache for JDKs as well is important to reduce built times. Also note that relying on matrix jobs isn't always an option and also not reproductible when doing local development builds.

@devminded devminded added feature request New feature or request to improve the current logic needs triage labels Nov 2, 2021
@dmitry-shibanov
Copy link
Contributor

Hello @alsutton. Sorry for the late response. We'll investigate the issue.

@dmitry-shibanov
Copy link
Contributor

Hello @devminded. We would not like to implement such kind of logic, because the initial caching logic for setup-java should cover the most often use cases. If you want to use some more complex caching logic we would recommend you to use actions/cache. It's relevant to setup-node ADR.

For now I'm closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

2 participants