Cache toolchains in CI

Hi,
I’m using the java toolchains to run tests un multiple JDKs in CI. I’d like to cache the jdks, and I thus added ~/.gradle/jdks/ to the list of the cached files. However, this change triggered cache misses. By looking at which files changed when I run locally, I decided to remove the lock files before caching, but I still get cache hits.

What should I cache?

Is there any guide on which files should be cached in CI when using Gradle? It would be useful.

1 Like