What's New in Gradle 9.0
Gradle 9.0 is a major step forward, focusing on making Configuration Cache the go-to execution mode for faster, more reliable builds. It requires Java 17 or higher to run, updates the embedded Kotlin to version 2.2 and Groovy to 4.0, and brings cleaner error messages plus many performance tweaks. The release adopts Semantic Versioning for clearer compatibility promises. While Configuration Cache isn't on by default yet, Gradle strongly recommends enabling it, with plans to turn it on automatically in Gradle 10. Overall, this version helps large projects run quicker, reduces memory use, and prepares builds for modern Java and Kotlin workflows.
Configuration Cache as Preferred Mode
Configuration Cache stands out as the biggest push in Gradle 9.0. It caches the configuration phase so Gradle skips repeating expensive work on subsequent builds. Many improvements from recent 8.x versions come together here: string deduplication to shrink cache files, parallel loading and storing for quicker startup, and full support for dependency verification with checksums and signatures.
Real-world gains are impressive -- some teams see configuration time drop by half and cache sizes shrink significantly. New builds created with gradle init enable it right away. For existing projects, Gradle gives hints in the CLI when it's safe to try, and core plugins handle incompatibilities gracefully. Encryption keeps sensitive data protected in the cache too.
Runtime and Language Updates
Gradle now needs Java 17+ to run the daemon -- older JVMs won't work. This aligns with modern Java features and lets Gradle use newer toolchains easily.
Kotlin DSL gets a big lift with Kotlin 2.2 embedded. You gain better type inference, smarter casts, and Compose Multiplatform compatibility. Scripts compile faster thanks to avoidance of unnecessary recompiles, and first-use builds feel snappier since extensions ship in the distribution.
Groovy moves to 4.0, adding new language capabilities but with some behavior shifts in Groovy-based scripts and plugins. Check your plugins for updated versions that support Groovy 4.
Performance and Memory Wins
Beyond Configuration Cache, several tweaks speed things up:
- Kotlin DSL avoids recompiling unchanged scripts, cutting time for simple tasks like
:help. - Tooling API optimizations make IDE syncs faster, especially in huge builds with thousands of tasks.
- Compiler daemons stay alive longer across builds, boosting Java compilation speed.
- Filesystem watching now works on Alpine Linux containers.
- Dependency resolution uses less memory during IDE imports and complex graphs.
Build Authoring and Dependency Improvements
Reproducible archives become the default for JAR, ZIP, WAR, and similar tasks. Files get fixed timestamps, sorted entries, and consistent permissions so outputs match exactly across machines -- great for security and caching, but it may break tests or processes that expect specific order or dates. You can override this if needed.
A new RootComponentIdentifier lets detached configurations resolve project dependencies cleanly.
Variant and attribute APIs simplify fetching the right dependencies. JSpecify annotations replace older nullability markers for stricter API contracts.
Tooling, Testing, and Usability
Test dry run with --test-dry-run shows what would execute without running tests. Skipped tests now explain why in HTML and XML reports.
Build init defaults to Kotlin DSL, supports Maven conversion, version catalogs, and non-interactive mode.
Error reporting uses the Problems API for clearer HTML summaries, duplicate suppression, and detailed cache miss reasons.
Deprecations, Removals, and Breaking Changes
Many old APIs incompatible with Configuration Cache are gone. Groovy 4 and Kotlin 2 introduce syntax and behavior shifts -- upgrade plugins and review scripts.
Reproducible archives by default can affect checksum-sensitive workflows. Java 17 requirement breaks older setups.
Check the upgrade guide for full details on removed items and migration steps.
Upgrade Notes
To move to Gradle 9.0, update your wrapper to 9.0 and ensure your build runs on Java 17+. Enable Configuration Cache early -- start with --configuration-cache and fix any reported issues. Test reproducible archives don't break your pipeline. For Kotlin DSL, enjoy the speedups but watch for Kotlin 2 changes. Groovy users should verify plugin compatibility with Groovy 4. Most builds upgrade smoothly once Java requirement is met, and the performance payoff from Configuration Cache makes it worthwhile.