Gradle 9.5 Ships Task Provenance in Error Messages, Type-Safe Kotlin Settings Plugins, and Wrapper Retry Support
Gradle 9.5.0 and its patch 9.5.1 bring clearer diagnostics, CI-resilient wrapper downloads, and long-awaited Kotlin DSL improvements.
Overview
Gradle 9.5.0, released on April 28, 2026, adds a trio of improvements that developers and plugin authors have been requesting for years: error messages that tell you exactly where a failing task was registered, type-safe Kotlin accessors for settings-level convention plugins, and opt-in automatic retries for wrapper distribution downloads. A patch release, 9.5.1, followed on May 12, 2026, resolving three bugs introduced in 9.5.0.
Task Provenance in Error Messages and Reports
The most immediately visible change is that build failure output now includes the origin of the failing task. Where Gradle previously printed a bare task path, it now appends a provenance note, such as: Execution failed for task ':app:compileJava' (registered by plugin 'org.gradle.api.plugins.JavaPlugin').
According to the official Gradle 9.5.0 release notes, this context surfaces whether a task came from a build script, a settings script, or a named plugin. The same information is also available via ./gradlew tasks --provenance for exploratory use. The April 2026 Gradle Newsletter frames the feature’s intent: “when a task fails, Gradle now tells you whether it was registered by a build script, a settings script, or a plugin.”
A related diagnostics improvement extends to daemon JVM compatibility. When Gradle rejects an existing daemon because the requested JVM configuration does not match, it now logs a structured mismatch at the INFO level rather than a terse rejection.
Type-Safe Kotlin Accessors for Settings Convention Plugins
Gradle’s Kotlin DSL has offered type-safe generated accessors for project-level precompiled script plugins since earlier in the Gradle 7 series. With 9.5.0, that support extends to .settings.gradle.kts precompiled plugins.
Plugin authors who use the kotlin-dsl plugin in their build can now apply settings convention plugins with the same IDE autocompletion and compile-time checking as project-level conventions, as described in the release notes. The Gradle Newsletter describes the result as giving settings plugins “the same IDE autocompletion and compile-time checking as Project-level conventions.”
Wrapper Download Retries
Gradle wrapper downloads are sensitive to temporary network failures — a common cause of flaky CI pipelines. Gradle 9.5.0 adds two optional properties to gradle-wrapper.properties that enable automatic retries with exponential backoff:
retries=3
retryBackOffMs=1000
The first sets the maximum number of retry attempts; the second sets the initial delay in milliseconds between failures, doubling on each subsequent attempt. As the release notes state, retries are disabled by default, preserving existing behavior. The Gradle Newsletter positions the feature as a way to “reduce flaky CI failures on unstable networks.”
Additional Changes in 9.5.0
Beyond the three headline features, several smaller improvements shipped in the same release, per the Gradle 9.5.0 release notes:
gradle init --into: The initialization task now accepts a--intooption to place the generated project in a named subdirectory, such asgradle init --type java-application --into my-new-project.- Domain Object Collection locking: A new
disallowChanges()method lets plugins protect their configured collections from later modification by other plugins, while still permitting individual element changes. - Daemon bind address: The
GRADLE_DAEMON_BIND_ADDRESSenvironment variable allows explicit control over which network interface the Gradle daemon listens on, useful in hardened CI environments. - Develocity CLI flag: Build Scans can now be published by passing
--develocity-url https://develocity.example.comon the command line without modifying project files. - Reorganized help output:
./gradlew --helpnow groups its options into logical sections rather than presenting them in a single alphabetical list. - Tooling API enhancements: Tooling API clients, including IDE plugins, can now query Gradle for help and version information directly.
Patch Release: Gradle 9.5.1
Gradle 9.5.1 shipped on May 12, 2026, as documented in its release notes. The patch resolves three regressions introduced in 9.5.0: an out-of-memory error when upgrading from 9.4.1 (GitHub issue #37753), a breakage preventing the Tooling API from working with relative project directories (GitHub issue #37797), and missing documentation for CreateMD5.java (GitHub issue #37812). No new features were added.
Ecosystem Context
The 9.5.x release continues Gradle’s roughly two-month minor release cadence: 9.4.0 shipped March 4, 9.4.1 on March 19, and 9.5.0 on April 28, 2026, according to the Gradle releases page. Separately, the Gradle Newsletter notes that IntelliJ IDEA 2026.1 now bundles Gradle best-practice inspections — described as “more than 30 practices” — developed through a collaboration between JetBrains, Google, and Gradle.
What We Don’t Know
Gradle has not disclosed a release date or specific feature scope for 9.6.0. The project’s Isolated Projects feature, which aims to enable further build-graph parallelism, has been in pre-alpha incubation through the 9.x series without a stable-promotion timeline announced.
To upgrade, run:
./gradlew wrapper --gradle-version=9.5.1 && ./gradlew wrapper