Skip to content

Configuration Cache

kirich1409 edited this page May 18, 2026 · 1 revision

Configuration Cache

featured-gradle-plugin officially supports the Gradle Configuration Cache on Gradle 9+ and AGP 9+. Every task registered by the plugin stores and reuses CC entries without violations.

Supported tasks

All tasks registered by featured-gradle-plugin are CC-clean:

Task Purpose
resolveFeatureFlags Resolves DSL-declared flags before code generation (per module)
generateFeaturedProguardRules Generates R8 -assumevalues rules for Android/JVM
generateConfigParam Generates the GeneratedLocalFlags / GeneratedRemoteFlags objects
generateFlagRegistrar Generates flag registrar code for the debug registry
generateIosConstVal Generates expect/actual const val for local flags (KMP)
generateXcconfig Generates the xcconfig file for iOS Swift DCE
scanAllLocalFlags Aggregates flags across all modules (root project)

Enabling

Add the following to gradle.properties:

org.gradle.configuration-cache=true

Known gap — AGP 9.x proguardFiles provider propagation

AGP 9.x exposes variant.proguardFiles as a ListProperty<RegularFile>, but on the AGP releases verified during the 1.0.0-Beta cycle (AGP 9.1.0) the provider's dependency does not propagate to the underlying R8 / minification tasks. As a result, wiring the plugin's generated proguard-featured.pro purely through variant.proguardFiles.add(…) is insufficient — the R8 task does not see the file as an input dependency and runs before the rules are generated.

featured-gradle-plugin retains a tasks.configureEach { … } fallback inside AndroidProguardWiring.kt that explicitly establishes the task dependency. The fallback is CC-safe (no Project reference at execution time, no eager configuration) and will be revisited on every AGP minor release and removed when the upstream provider propagation gap is fixed.

The audit that confirmed this gap is tracked in the main repository:

Upstream limitations (third-party plugins)

Third-party Gradle plugins applied alongside featured-gradle-plugin may introduce CC violations through transitive plugin application. Any such violations are not caused by featured-gradle-plugin itself — the plugin's own task graph is CC-clean per the fixture audit. Known upstream gaps observed during verification are listed under "Per-violation table" in the sample audit report.

Isolated projects

featured-gradle-plugin is CC-safe but not isolated-projects safe. See Known Limitations and Multi-Module Setup for details.

Verification artefacts

All verification artefacts live under docs/cc-verification/ in the main repository:

Clone this wiki locally