Where is the build cache stored by default

Hi,

I’m trying a few things to try to save the build cache directory during a CI job and then restore it in subsequent ones.

But I’m not able to locate where exactly the build cache is storing the cached task outputs.

I know that it can be explicitly set in settings.gradle but to avoid having to make changes in source (gradle.properties and settings.gradle), I’d like to use the build cache by passing in the command line parameters for now.

Thanks

In GRADLE_USER_HOME which by default is ~/.gradle/

Thanks for the reply @Vampire.

I actually meant to ask where inside ~/.gradle, can this directory be found.

For example, in settings.gradle, if the directory location is set, then all the cache files can be found in that particular directory.

Does Gradle create such a directory inside ~/.gradle for the default case?

Thanks

I’d guess it is caches/build-cache-1/ :slight_smile: