- Large multi-module projects with many dependencies
- Android projects with complex build configurations
- Monorepos with shared library modules
Getting started
You can produce a ready-to-use configuration using the CLI:Configure cache access
GitHub Actions Example
Combining with Cache Volumes
The Gradle build cache stores compilation outputs and task results, but your builds also download dependencies (JARs, plugins, etc.) that are not covered by the build cache. You can use Cache Volumes to persist the Gradle dependency cache across runs, so dependencies don’t need to be re-downloaded each time. Using both together gives you the best performance — Cache Volumes for downloaded dependencies, and the Gradle build cache for build outputs:Using from your local workstation
You can also use Namespace’s Gradle build cache from your local machine. Since the cache is shared, local builds benefit from outputs already cached by CI — and vice versa. First, create a long-term token with access to the cache:Output
token.json in the current directory. Then set up the Gradle cache for your user:
How it works
The Gradle caching solution employs a tiered caching approach, where the hot cache lives as close to the consumer (e.g. your CI job runner) as possible. The cold caching tier is backed by our high-performance artifact storage and enables Gradle to retain a vast amount of cached build outputs. Access to the Gradle cache is granted through short-lived secure credentials.Usage
Namespace accounts Gradle cache usage in two categories:- Gradle cache storage
- Gradle cache reads