Gradle 9.6.0 Stops Invalidating Configuration Cache for CI-Only Parameters
For Android teams running CI pipelines with per-build parameters, this fix directly reduces build times by preserving configuration cache hits. It also signals Gradle's tightening of implicit cross-project dependencies, which will force cleanup of fragile Groovy DSL patterns before Gradle 10.
Gradle 9.6.0 ships a targeted fix for a common CI headache: configuration cache invalidation caused by project properties that are never read during the configuration phase. In older versions, passing parameters like build numbers, channel IDs, or feature flags via `-Dorg.gradle.project.*` or `ORG_GRADLE_PROJECT_*` would force a cache recomputation even if those values were only consumed inside task actions. The new release detects whether a property actually participates in configuration and skips cache invalidation if it doesn't.
Beyond the cache fix, the release adds `--non-interactive` to prevent builds from hanging on prompts in headless CI environments, and `NO_COLOR` support to strip ANSI codes from logs. Test HTML reports now have sortable columns. A significant deprecation targets implicit parent-project property lookups in subprojects — a pattern common in older Android multi-module setups — with full removal planned for Gradle 10. The upgrade path is the standard wrapper update, requiring JVM 17–26 and compatible with AGP 9.0 through 9.3.0-alpha06.
The configuration cache fix is narrowly scoped — it only helps when properties are truly unused during configuration. Custom tasks or plugins that read environment variables or perform I/O in the configuration phase will still break caching.
The deprecation of implicit parent-project lookups is the more disruptive change for established Android projects. Many teams have years of accumulated Groovy DSL scripts that rely on this behavior, and the migration window is now open.
The `--non-interactive` flag addresses a silent CI failure mode that is notoriously hard to debug — a build that hangs waiting for input with no obvious error in logs.