-
Notifications
You must be signed in to change notification settings - Fork 11
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
Cache JDKs auto provisioned by Gradle toolchains #17
Comments
Running this will tell you what toolchain is requested (regardless of whether it's downloaded or not, because it turns off auto-provisioning and detection). But 🤮
|
This would be a great addition! I played around with this and couldn't find anything to specifically create a cache key for. However, I believe all toolchains are determined by |
Hi @jamesbassett I just started to look into this issue, but it seems that |
Hi @ryanbourdais just to be clear this is totally independent of dependency caching (the provisioned toolchains live in a completely different directory While it's quite possible that the toolchain is configured in a
it's also very possible that it has been applied by a Gradle plugin (binary or precompiled script) which means you can no longer compute the cache key from the build script. So at the moment I'm not sure if this is solvable in a generic way - I was hoping somebody would have a clever idea 😉 As @Jaryt has suggested, caching the toolchain based on
|
Hi @jamesbassett , I do see what you mean now. I think as @Jaryt suggested, caching |
Is your feature request related to a problem? Please describe.
JDKs that are auto-provisioned by Gradle builds that use toolchains are not cached by the gradle orb.
Describe the solution you'd like
I would like the gradle orb's
with_cache
command to cache auto-provisioned JDKs between builds.Describe alternatives you've considered
As a workaround you can manage this cache without the gradle orb (not ideal).
Additional context
Auto-provisioned JDKS live in
.gradle/jdks
.I'm not sure how you would implement the cache key suffix (i.e. the
cache_seed
component) - the toolchain is likely configured in the build script (build.gradle.kts
) but might be applied by a plugin.Ideally you could work out what toolchain has been configured, but I can't see an easy way to do that.
The only thing I can think of is to run the following command and use the hash the output. Unfortunately it requires the toolchain to have been downloaded already (which defeats the purpose of the cache).
The text was updated successfully, but these errors were encountered: