Guides
How to enable the Gradle configuration cache
Gradle spends 30 to 60 seconds configuring before compiling anything.
4 min read
Gradle spends 30 to 60 seconds configuring before compiling anything.
Why it happens
Without the configuration cache, Gradle re-evaluates every build script on every invocation.
How to fix it
- Add --configuration-cache and fix the incompatible tasks it reports
- Combine with --build-cache for output reuse
- Avoid dynamic versions, which force re-resolution and defeat the cache
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
How to make CI caches actually persistCaches are configured but hit rate is low.How to work around the 10 GB cache limitYour caches exceed 10 GB per repository and start silently evicting.How to share a build cache across repositoriesEach repository maintains its own cache for the same shared dependencies.How to share a Docker cache between jobsEach matrix leg rebuilds the same layers.