Image for post
Image for post

Configuration Caching deep dive

Ivan Gavrilovic
Jul 29 · 8 min read

What is configuration caching?

Performance improvements

Total build time with and without configuration caching
Total build time with and without configuration caching

How to try it out?

org.gradle.unsafe.configuration-cache=true
# Use this flag sparingly, in case some of the plugins are not fully compatible
org.gradle.unsafe.configuration-cache-problems=warn

How does it work?

Using compatible Gradle API

Using Project instance in task

Accessing Gradle/system properties or environment variables

Sharing work between tasks

Lessons from Android Gradle Plugin migration

428 problems were found reusing the configuration cache, 4 of which seem unique.

Android Developers

The official Android Developers publication on Medium

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store