Not on the latest Gradle? The Gradle Security Subscription covers older versions under SLA. Learn more →

What's new in Gradle 9

Gradle 9 makes the Configuration Cache the preferred way to run builds, requires Java 17 or later, moves to Kotlin 2 and Groovy 4, and follows Semantic Versioning.

Key updates in Gradle 9

Below is a summary of the key updates between Gradle 8.0 and 9.0.0.

NOTE: Make sure to follow the Upgrade Guidelines.

As you can see, we are switching to a 3-digit version format. Starting with 9.0.0, Gradle releases follow the Semantic Versioning (SemVer) specification for all stable features; incubating features and internal APIs might have a different lifecycle.

Configuration Cache

The Configuration Cache is one of Gradle’s most popular recent features. Whether you’re building Java, Kotlin, Android, or native projects, it can significantly reduce configuration time, especially in large codebases. Over the past few years, we’ve delivered numerous improvements to make the Configuration Cache faster and more reliable, and to improve the experience for adopters and developers.

As of Gradle 9.0.0, the Configuration Cache is the preferred execution mode, and we strongly recommend that Gradle users start adopting it in their builds. Plugin authors should also aim for Configuration Cache compatibility in their plugins. The Adoption Guide in the documentation helps you get started, troubleshoot, and fix the most common compatibility issues. Also see the recording of the Configuration Cache Webinar for tips on adoption steps and additional tools.

Configuration Cache as the preferred execution mode

To encourage further adoption and compatibility in community-maintained plugins, we now recommend enabling the Configuration Cache in most scenarios. The Configuration Cache is not enabled by default for your builds in this release, but there are notable changes:

  • When Gradle detects that no incompatible features were used, the CLI output now recommends enabling the Configuration Cache.
  • In new projects generated with gradle init, the Configuration Cache is now enabled by default.
  • Developer tooling and the Configuration Cache documentation have improved considerably to make adoption and troubleshooting easier.
  • Core Gradle plugins and build tasks can now gracefully downgrade the build mode when they are not compatible with the Configuration Cache. This means you can permanently enable the Configuration Cache, even with Gradle plugins that are not fully compatible, without build failures.
  • Gradle 9 removed many previously deprecated APIs that are incompatible with the Configuration Cache, in favor of safe, idiomatic alternatives that are compatible with it. This cleanup, and the related deprecations, will continue in the next releases.

In the upcoming Gradle 9.x.y minor releases, we will focus on plugin ecosystem compatibility, developer tooling, higher cache hit rates, and better performance, with the goal of enabling the Configuration Cache by default in Gradle 10.

Learn more about the 9.0.0 release: 9.0.0 changelog, Upgrade Guidelines

Configuration Cache encryption

Since Gradle 8.1, Gradle encrypts the Configuration Cache to reduce the risk of accidentally exposing sensitive data. Gradle transparently generates a machine-specific secret key as needed, caches it in the Gradle user home directory, and uses it to encrypt the data in project-specific caches.

Full support for dependency verification

Gradle supports dependency verification through additional metadata files. Both checksum and signature verification are available as opt-in features. Since Gradle 8.1, dependency verification is fully supported in the Configuration Cache execution mode. Changes to the associated files (keyring files or verification-metadata.xml) are detected correctly and invalidate the Configuration Cache when necessary.

Deduplicating strings

Gradle 8.10 significantly reduced the cache file size through string deduplication, and made cache loading faster at the same time. For example, the AndroidX team reported a 3.75x size reduction.

Parallel load and store in the Configuration Cache

In Gradle 8.11, we significantly improved Configuration Cache performance by loading and storing cache entries in parallel (see the release notes). Our benchmarks show a significant performance improvement, and parallel configuration improves performance further in many scenarios. One adopter reported a 50% reduction in configuration time for a build with ~600 projects, from 2m4s to 55s, while the cache size dropped from 700 MB to 400 MB.

Parallel Load and Store in Configuration Cache

Learn more: Gradle 8.11 Release Notes, Documentation page, Blog post by Iñaki Villar

More performance improvements

The Configuration Cache provides a major speed boost, but other important changes also improve overall Gradle performance, especially when building projects and during IDE sync.

Kotlin build script compilation avoidance

Kotlin DSL offers much better IDE assistance for build authors, but Kotlin’s longer compilation time compared to Groovy can be an issue for large projects. Together with the JetBrains and Google teams, we keep working on the performance of builds that use Kotlin DSL. Using Kotlin 2 features (see below), Gradle 9.0.0 shortens feedback loops when you edit build logic by avoiding unnecessary recompilation of Kotlin DSL (.kts) build scripts.

In the example below, we observed a 2.5x speedup when running :help after a build modification.

Kotlin build script compilation avoidance

The Kotlin 2 section below includes an overview video.

Memory usage reduction

Gradle 8.1 and 8.3 introduced significant memory optimizations for dependency resolution. Most builds benefit, but the gains are larger during IDE sync, particularly for complex projects with many dependency resolution operations.

Improved IDE performance through Tooling API optimization

Starting with Gradle 8.8, the Tooling API executes large task graphs more efficiently, improving performance by up to 12% in large, up-to-date builds with more than 15,000 tasks in their task graph. Updating your Gradle version immediately benefits Android Studio, IntelliJ IDEA, Eclipse, and other Tooling API clients.

See the changelog entry for more details.

Kotlin and Kotlin DSL

Kotlin DSL for Gradle uses the Kotlin language to provide full IDE assistance for build authoring in IntelliJ IDEA and Android Studio. This includes auto-completion, smart content assist, quick access to documentation, navigation to source, and context-aware refactoring. With Kotlin DSL, you edit your build logic with the same experience you’re used to when working on production and test code. The Groovy DSL remains fully supported, and there are no plans to deprecate it. We continue to improve Kotlin DSL integration and performance, with many changes delivered since 8.0.

Learn more about Kotlin DSL in Gradle.

Kotlin DSL became the default for new builds

In April 2023 (Gradle 8.2), Kotlin DSL became the recommended option for new Gradle projects, and the defaults in gradle init and the Gradle User Manual reflect this. Kotlin DSL also became the default for new projects in IntelliJ IDEA and Android Studio. We expect most new projects to use Kotlin DSL going forward.

Kotlin DSL is Now the Default for New Gradle Builds

Update to Kotlin 2

Kotlin 2.0, released on May 21, 2024, marks a major milestone. It brings numerous language enhancements, such as explicit smarter type inference, more precise smart casts (even after ||, within lambdas, and across nullable expressions), and deeper integration with tools like Compose Multiplatform. Kotlin 2.1.0 (November 2024) and 2.2.0 (June 2025) followed with further improvements.

Gradle 9 embeds the latest stable release of the Kotlin 2.2.x runtime and uses Kotlin language version 2.2. This is a shift from Gradle 8.x, which embedded Kotlin 2.0 starting in 8.11 but kept Kotlin language version 1.8 for compatibility. Build authors using Kotlin DSL and developers of Kotlin-based Gradle plugins now get access to new language features and a better experience in IDEs and other developer tools. At the same time, Kotlin 2 introduced several syntactic and semantic breaking changes, so you might need to update your build and plugins when upgrading to Gradle 9.

Learn more: Changelog entry, Upgrade guide

Kotlin DSL improvements

Throughout Gradle 8.x, we kept improving Kotlin DSL to offer a better developer experience, with many improvements to new and existing features. Key highlights include:

  • Simple property assignment with the = operator in Kotlin DSL scripts in 8.6
  • The Version Catalog API is available in precompiled scripts in 8.5
  • DSLs for new features, especially for Variants and Attributes
  • A dedicated Kotlin DSL reference built with Dokka, so the layout is familiar to Kotlin developers
  • Better integration with Kotlin tools for error and warning reporting, the ability to fail on warnings from script compilation, and enforcement of Kotlin metadata checks

Faster first use

Since Gradle 8.5, the Kotlin extensions for the Gradle API ship as part of the Gradle distribution. As a result, the first use of a Gradle version to compile .gradle.kts scripts is much faster, saving about 4 seconds on the first run on powerful machines. This is especially noticeable on ephemeral CI agents and in cross-version tests for Gradle plugins.

See the changelog entry for more details.

JSpecify and Kotlin binary API changes

Since Gradle 5.0, we’ve used JSR-305 annotations to make the nullness of type usages explicit in the Gradle API. Starting with Gradle 9, the Gradle API is annotated with JSpecify instead. Combined with the JSpecify annotations in the Gradle API, Kotlin 2.2 introduces stricter nullability handling and may generate different binary APIs.

This change may affect all plugins and builds implemented in Kotlin, but it also greatly reduces the risk of issues related to nullable APIs. For details and potential breakages, see the dedicated upgrade guide section.

Java versions and toolchains

As Java evolves, Gradle evolves with it, adding support for new versions and for new features that improve the developer experience.

Java 17 is the minimum version to run Gradle

Starting with this release, Gradle requires Java 17 or higher to run. You will need to upgrade your runtime to at least Java 17. See the Gradle Compatibility Matrix for more information about supported versions and configurations.

If you build Java projects with older Java versions, you can still target them using toolchains or other ways of separating the Java version that runs Gradle from the one your build uses.

Learn more: Changelog entry, Upgrade guide

New Java versions are supported for running Gradle and building projects

We add support for new Java versions incrementally, both for building projects with a specified toolchain and for running Gradle itself. Gradle 8.0 supported versions up to Java 19, and Gradle 9.0.0 supports versions up to Java 24 for both use cases.

See the Compatibility Matrix for the current state of Java support and recommendations.

Support for JAVA_HOME as a toolchain location

Starting with Gradle 9.0.0, toolchain auto-detection can use the value of the JAVA_HOME environment variable. Gradle now discovers and uses the Java version provided through this standard environment variable.

Support for GraalVM in toolchains

Gradle’s toolchain support lets you provision and select specific JDK versions for building projects: compiling code, running tests, and even running Gradle itself. Starting with 8.14, if the nativeImageCapable flag is set, Gradle selects only JDKs that support Native Image when resolving a toolchain.

Learn more: Documentation entry

Gradle Daemon improvements

Toolchain for the Gradle Daemon

Since Gradle 8.8, you can run the Gradle Daemon on a different JVM from the one running the Gradle CLI by configuring the Daemon JVM criteria. Gradle first tries to find a compatible Java toolchain among the installed versions; this is known as Daemon JVM auto-detection. With Daemon JVM auto-provisioning, introduced in 8.13, Gradle can also download a matching Java toolchain when none is found locally.

Since 8.10, the Daemon JVM criteria can also specify the JVM vendor. When choosing among the available JVM toolchains, Gradle only selects a toolchain that matches both the specified vendor and version. See the changelog entry for more details.

For more information, see Daemon JVM criteria in the Gradle User Manual.

Faster builds by keeping the compiler daemon alive between builds

Gradle 8.3 made Java compilation faster on Linux and macOS by keeping compiler daemons alive between builds. Gradle’s internal performance tests show up to a 30% build time improvement for builds dominated by Java compilation. Gradle 8.4 brought the same improvement to Windows.

File system watching on Alpine Linux

File system watching is now supported on Alpine Linux, a popular choice for container-based images and the default distribution for Docker.

Update from Groovy 3 to Groovy 4

Gradle embeds the latest stable release of Groovy 4.0, a major upgrade from the Groovy 3.0 version used in Gradle 7 and 8. Groovy 4 introduces a range of new features and improvements to the Groovy language. For a full overview, see the Groovy 4.0 release notes.

In the Gradle ecosystem, Groovy is used for several things: Groovy DSL build scripts (.gradle files), build logic in common and convention plugins that can be partially implemented in Groovy, and Ant integration.

As with any major upgrade, some behavior has changed, but we expect this to mostly affect plugins written in Groovy rather than build scripts that use the Groovy DSL. As a result, builds that use such plugins may be affected (for example, issue #1469 in the Shadow plugin, now resolved). If you’re upgrading to Gradle 9, check for new versions of the plugins you use that include compatibility fixes.

Learn more: Changelog entry, Upgrade guide

Build authoring

At Gradle, we want to provide the best possible user experience, especially for software developers who are less experienced with build authoring. Whether you use Gradle from the CLI, your favorite IDE, or a CI/CD system, Gradle 9 should improve your experience. This includes better DSLs and APIs for those who develop Gradle builds, and better tools for troubleshooting build and sync failures. Clean, actionable error reporting has been one of the major themes for Gradle’s engineering teams in recent years, with many features delivered in Gradle 8.x and planned for Gradle 9.

Problems API

One of the key highlights of the 8.x releases is the new Problems API, which already helps with many use cases, such as deprecations, Configuration Cache compatibility, and compilation warnings. Watch a summary of what we delivered in recent releases:

Problems HTML report

Starting with Gradle 8.11, reported problems are also summarized in a new HTML report, in addition to the CLI output and the API. The report is a central place to review problems that occur in a build, whether they come from internal or external plugins. It is enabled by default, and you can find a link to it in the console output.

Better error reporting

Gradle’s error reporting has improved considerably across releases. The changes include, but are not limited to, suppressing duplicate error reports when multiple failures share the same cause, detailed information for Configuration Cache misses, and better reporting for failed plugin application and JVM matching.

All changes
  • Suppressing duplicate error reports when multiple failures share the same cause (8.8)
  • Improved Java compilation task failure reporting (8.10)
  • Detailed information for Configuration Cache misses (8.9)
  • Improved plugin application error reporting (8.7)
  • Clearer suggested actions for dependency locking errors (8.6)
  • Copy task error reporting (8.7)
  • Improved JVM version mismatch error reporting (8.8)
  • Improved error handling for toolchain resolvers (8.8)
  • Fixed error reporting when repositories are disabled (8.8)
  • Reporting for variant ambiguity and missing variants (8.9)
  • Detection and reporting of ambiguous artifact transformation chains (8.12)

Support for test dry run

When testing your project, it can be useful to check which of the selected tests would run without actually executing them, especially when using test filtering. Gradle 8.3 introduced a test dry run mode, which you can enable with the --test-dry-run command-line option or the dryRun property.

This mode is compatible with the JUnit and TestNG frameworks.

Better reporting for skipped tests

Starting with 8.14, when a test is skipped because of an assumption violation, Gradle includes the reason in both the HTML and JUnit XML reports. This applies to JUnit 4, JUnit Platform, and TestNG. See the changelog entry for more details.

Build Init improvements

Gradle Build Init received several improvements to align it with new features and best practices:

  • Generating Kotlin DSL builds by default in 8.2
  • Support for converting Apache Maven projects to Gradle in 8.2 (see the Migration Guide)
  • Generating builds with a version catalog in 8.5
  • Support for a Java version parameter in 8.5
  • Support for skipping interactive questions in 8.6
  • Enabling the Configuration Cache by default in 8.11

More Build Init features are available through additional plugins, for example, generating Declarative Gradle builds.

Additional improvements

There are also many other changes and quality-of-life improvements. The Gradle changelog has the full list of changes in minor releases. Key highlights include:

Strengthening supply chain security with Gradle

We continue to invest in supply chain security for Gradle projects. In particular, it’s critical for developers to be able to reproduce builds and troubleshoot their contents. Tracking dependencies and detecting potential vulnerabilities is also a priority for all modern build systems, including Gradle. Between Gradle 8.x and 9.x, we made several improvements in this area.

Reproducible archives by default

Gradle now produces reproducible archives by default, ensuring byte-for-byte identical content for JARs, ZIPs, and other Java packages. Consistent timestamps, permissions, and file order have been available as options since Gradle 3.4; they are now configured by default.

This change is a step toward reproducible builds, which strengthen trust that a binary was really produced from specific sources. It also helps tools outside Gradle that work better with byte-for-byte equivalence.

Note that this can be a breaking change for some users. The reproducible archives that Gradle 9 produces have a reproducible file order, fixed timestamps, and preconfigured permissions. If your build depends on a specific file order, changing timestamps, file system permissions, or file executable bits, you may need to reconfigure your archive tasks.

Learn more: Changelog, Upgrade guide

GitHub Actions and the Dependency Submission Action

As part of our supply chain security partnership with GitHub, we released the new Dependency Submission Action for Gradle. You can configure this action to automatically submit dependencies to GitHub’s dependency graph and receive Dependabot alerts for potentially vulnerable direct and transitive dependencies. Read more in the announcement blog post and the official press release. We also published a short overview video.

GitHub has also continued improving Dependabot. In May 2025, GitHub introduced dependency auto-submission for Gradle dependencies. As of June 2025, Dependabot also supports Gradle lockfiles; see Locking Versions for more details.

Gradle Wrapper improvements

The Gradle Wrapper task now supports symbolic version names (8.1) and validates that the distribution URL exists (8.2). Starting with Gradle 9, you can also request Gradle versions using a partial SemVer specification, for example, “9” or “9.1” instead of a full 3-digit version (changelog entry).

Other features

The list above highlights only the key changes in Gradle 9.0.0 and the key themes of recent minor versions. The release also includes many smaller enhancements, bug fixes, and removals of deprecated APIs. Some core Gradle plugins, such as the static analysis and native plugins, also received major improvements.

These changes might be important to some users. You can find them in the Gradle changelog or in the documentation for individual plugins.

Build Scan and Develocity integrations

Any Gradle user can analyze their builds, troubleshoot performance and dependencies, and get more insight into the build process with the free Build Scan service provided by Gradle Technologies. The service uses the Develocity Gradle Plugin for publishing and keeps improving with new versions of Develocity and Gradle.

Many changes were delivered between the Gradle 8.0 and 9.0.0 releases. Some are specific to Gradle 9; others are also available for earlier versions:

  • AI-based grouping of build and test failures
  • Reporting of system resource usage in the build environment, including CPU, RAM, network, and disk I/O
  • Insights into artifact transforms
  • More metrics and details about the Configuration Cache, including reporting of cache miss reasons
  • Support for Isolated Projects in all Build Scan and Develocity features
  • Multiple integrations for Develocity-specific features, for example, better reporting of Predictive Test Selection and test parallelization savings
  • Improved developer APIs and DSL syntax for configuring the plugin
  • Better reporting and visualization of key Gradle metrics, CLI output, and reports

AI-based grouping of failures in Develocity and Build Scan

If you haven’t tried Build Scan yet, the Build Scan walkthroughs on our YouTube channel give a guided tour of its main features.

System resource monitoring in Develocity and Build Scan

Learn more: Build Scan documentation, Develocity release notes, Develocity Gradle Plugin release history.

Documentation updates

The Gradle User Manual is one of the most frequently visited Gradle resources, and we continue to invest in it to provide clear, well-structured documentation for both fundamental and advanced Gradle features. Between Gradle 8.x and 9.x, the User Manual received several major improvements:

  • The Gradle User Manual was restructured, with dedicated pages for key features and improved navigation. New introductory material, including tutorials, was added.
  • The site search was replaced with Algolia DocSearch v3, customized to return more relevant results.
  • Code samples and snippets were refreshed to align with current Gradle best practices. Code snippets can now be copied, and full working projects can be downloaded.
  • A new feedback form was introduced to make it easier for users to suggest improvements.
  • Gradle Release Notes now include section anchors, making it easier to reference specific changes.
  • An experimental Gradle Cookbook was published: an open-source collection of recipes, guides, and integration examples with other tools and services.
  • A new Best Practices Guide was published to help developers adopt recommended patterns and avoid common pitfalls. It should especially help with the common concern that Gradle offers multiple ways to do the same thing. This ongoing effort is a collaboration between Gradle, Google, and JetBrains. Look out for new items in future versions.

All documentation remains open source, and we invite you to contribute! See the Documentation Contributor Guide.

Training materials and courses

Gradle Technologies publishes free training material on the Develocity YouTube channel, which replaced the old courses posted on gradle.org and many older Gradle Guides.

The channel serves developers and build platform engineers of all experience levels, from beginner software developers to experienced build engineers using Gradle or Develocity.

Gradle websites: new look and updates

In May 2025, we refreshed the look and feel of the gradle.org website! Along with the new look, you’ll find simplified navigation that directs you to important resources, including documentation, learning materials, and key feature overviews. We also invested in the underlying tooling so that changes and updates can be delivered quickly.

Gradle website - new landing page

Other updates to Gradle resources:

  • The Gradle Newsletter and Blog have a new look, tables of contents, and section anchors, so you can easily find and share information with your peers. You can also subscribe to updates via RSS!
  • We started a new open-source Gradle Community Site that brings together resources for contributors, including contributor guides and events like Google Summer of Code.
  • A new standalone site was launched for the Declarative Gradle project.

Excluded or delayed features

Provider API migration

The Provider API migration is an effort to embrace lazy configuration and make the APIs for Kotlin DSL and Groovy DSL consistent. On March 28, 2025, we decided to exclude the Provider API migration from the Gradle 9 scope. Early feedback confirmed that better IDE support is essential for the migration to succeed. That IDE support requires both enhancements in Gradle and corresponding adoption of those changes in IntelliJ IDEA and Android Studio.

We remain committed to the Provider API migration and are actively working to complete the remaining unmigrated properties. Our aspirational goal is to include them in Gradle 10, which is targeted for 2026.

Incubation status of Isolated Projects

Isolated Projects is a pre-alpha Gradle feature that builds on the Configuration Cache to further improve performance, particularly during Android Studio and IntelliJ IDEA sync. While some sources announced that Isolated Projects would become incubating in Gradle 9.0, the actual plan is to promote the feature in a later Gradle 9.x release.

Gradle 9.0.0 does not include changes specific to Isolated Projects. Priority went to productizing the Configuration Cache, which is a prerequisite for Isolated Projects to succeed. Once the work on this major release is complete, development on Isolated Projects will resume.

Upgrading to Gradle 9

As with any major release, upgrading to Gradle 9 requires a careful approach, because there are multiple potentially breaking changes. These include, but are not limited to: a higher minimum Java version, removed deprecated APIs and features, breaking changes in the Kotlin and Groovy DSLs due to the upgrades to Kotlin 2 and Groovy 4, and changes to generated binary APIs for Kotlin-based implementations after the adoption of JSpecify annotations. These changes can make not only your builds incompatible, but also the plugins they use.

While we expect most Gradle users to migrate to Gradle 9 relatively smoothly, your experience may vary depending on your build’s complexity. We urge everyone to carefully review and follow the Upgrade Guidelines and to test the new release before rolling it out widely in your organization.

Upgrade to Gradle 9

Review the upgrade guide and test the new release before rolling it out across your organization.