Gradle Release Notes

We are excited to announce Gradle 9.8.0-20260826015457+0000 (released 2026-08-26).

In this release, Java 27 is supported for both the Gradle daemon and Java toolchains.

The Configuration Cache now exposes its outcome directly through TestKit and the Tooling API, so plugin authors no longer parse console output to check whether a build was cached.

Build authoring gains a service() lookup for common Gradle services in scripts and task actions, along with a lazy destinationDirectory property on Copy and Sync.

In platform and toolchain management, Groovydoc now parses modern Java sources and exposes the Groovy 6.0 documentation options.

Performance improvements include faster read times on Windows machines with slow system clocks, with build-time gains of up to 45% in affected setups.

Finally, GenerateMavenPom now participates in up-to-date checks, speeding up Maven publishing.

We would like to thank the following community members for their contributions to this release of Gradle: Aman Gautam, Björn Kautler, Eng Zer Jun, Hashim Khan, Julian Krannich, KBS, Labh R Jethe, Mark Dodgson, Maxim, monkey, nataphon-ktsystems, Paul King, Qiu Tian, rg_sandesh, Roberto Perez Alcolea, Sean, Zongle Wang.

Be sure to check out the public roadmap for insight into what's planned for future releases.

Table Of Contents

Upgrade instructions

Switch your build to use Gradle 9.8.0-20260826015457+0000 by updating the wrapper in your project:

./gradlew :wrapper --gradle-version=9.8.0-20260826015457+0000 && ./gradlew :wrapper

See the Gradle 9.x upgrade guide to learn about deprecations, breaking changes, and other considerations when upgrading to Gradle 9.8.0-20260826015457+0000.

For Java, Groovy, Kotlin, and Android compatibility, see the full compatibility notes.

New features and usability improvements

Support for Java 27

With this release, Gradle supports Java 27.

You can now run the Gradle daemon on Java 27, in addition to using Java 27 via toolchains:

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(27)
    }
}

Some third-party tools (for example, PMD) do not yet support Java 27.

See the compatibility documentation for more details.

Configuration Cache improvements

Gradle provides a Configuration Cache that improves build time by caching the result of the configuration phase and reusing it for subsequent builds.

TestKit API for asserting the Configuration Cache outcome

Plugin authors testing Configuration Cache compatibility with TestKit previously had to parse console output to tell whether a cache entry was stored, reused, or discarded, an approach that broke whenever the wording of the console messages changed.

The BuildResult now exposes the outcome directly:

def result = GradleRunner.create()
    .withProjectDir(projectDir)
    .withArguments("myTask", "--configuration-cache")
    .build()

assert result.configurationCacheOutcome == ConfigurationCacheOutcome.STORED

See ConfigurationCacheOutcome for the possible outcomes.

The outcome is also available to any Tooling API client through a new CONFIGURATION_CACHE progress event type.

See the Testing with the Configuration Cache section in the Gradle User Manual for more details.

Build authoring improvements

Gradle provides rich APIs for build engineers and plugin authors, enabling the creation of custom, reusable build logic and better maintainability.

Look up Gradle services from scripts and task actions

Build, settings, and init scripts, as well as task actions, can now look up commonly used Gradle services directly, without declaring an @Inject point or going through the objects.newInstance(...) ceremony:

tasks.register("cleanReports") {
    val fs = service<FileSystemOperations>()
    doLast {
        fs.delete { delete("build/reports") }
    }
}

Use service(Class) in the Groovy DSL or service<Type>() in the Kotlin DSL. It is compatible with the Configuration Cache and Isolated Projects.

Available services by scope:

Service Available in
ObjectFactory, ProviderFactory, FileSystemOperations, ArchiveOperations Every scope
ProjectLayout Projects and tasks
BuildLayout Settings
ExecOperations Task actions

In the Kotlin and Java DSLs, looking up a service that is not available in the current scope is caught at compile time.

Precompiled script plugins that use service<Type>() require Gradle 9.8 or later at runtime.

See the Looking up services in scripts section in the Gradle User Manual for more details.

Lazy destination directory for Copy and Sync

The Copy and Sync tasks only exposed the destination as destinationDir, a plain File property, so a destination derived from a provider had to be resolved eagerly at configuration time. Both tasks now expose a destinationDirectory DirectoryProperty:

tasks.register<Copy>("copyFiles") {
    from("src")
    destinationDirectory = layout.buildDirectory.dir("out")
}

The property is the single source of truth for the destination. Assigning it is equivalent to calling into(...), and it reflects whatever was configured through into(...) or destinationDir.

into(...) now wires a Provider destination into destinationDirectory instead of resolving its value, so provider-based destinations stay lazy; all other notations (String, File, Closure, Callable, ...) keep their existing lazy resolution. Since destinationDirectory is a task output property, other tasks can consume it directly and pick up the task dependency.

The new property is incubating. destinationDir continues to work and will be deprecated once destinationDirectory is promoted.

See Copy.destinationDirectory and Sync.destinationDirectory in the DSL Reference for more details.

Platform and toolchain management

Gradle provides comprehensive support for Native development and JVM languages, featuring automated Toolchains for seamless JDK management.

Groovydoc supports modern Java sources and Groovy 6 output options

The Groovydoc task now exposes configuration options that had previously only been available through the Groovy CLI, Ant task, or Maven plugin, closing a long-standing gap in Gradle's Groovydoc support.

Java source parsing level: Groovydoc uses JavaParser to read Java sources mixed into Groovy projects. When the parser's assumed language level is older than the sources, modern constructs — switch expressions, sealed classes, records, and similar — fail to parse, and the affected classes are silently omitted from the generated documentation. The new javaVersion property forwards the language level to Groovydoc so those sources parse cleanly:

tasks.groovydoc {
    javaVersion = JavaLanguageVersion.of(21)
}

This option requires Groovy 4.0.27 or later and is silently ignored on earlier Groovy versions.

Groovy 6.0.0 documentation options: For projects using Groovy 6.0.0 or later, several new properties are now available on the Groovydoc task to control the generated output:

Property Purpose
showInternal Include members annotated with groovy.transform.Internal (GEP-17).
noIndex Suppress the alphabetical index page.
noDeprecatedList Suppress the deprecated-list page.
noHelp Suppress the help page.
syntaxHighlighter Select the client-side syntax highlighter ("prism" or "none").
theme Lock the palette ("auto", "light", or "dark").
preLanguage Default language id applied to unclassified <pre> code blocks.
additionalStylesheets Extra stylesheets copied alongside the default.

All of these are silently ignored on earlier Groovy versions, so they are safe to configure in builds that may be run against multiple Groovy releases.

All new properties are incubating.

See the Groovydoc task in the DSL Reference for the full list of configuration options.

Performance improvements

Gradle continues to reduce build times and memory usage across the daemon, configuration, and execution phases.

Improved performance on Windows machines with slow system clocks

Gradle reads the system clock frequently while a build runs, to capture execution traces, progress events, and log messages. On most machines, querying the time is inexpensive. However, on some Windows systems, particularly virtualized ones, reading the clock is much slower, and the increased cost can accumulate over the many readings taken during a single build invocation.

Gradle now detects these slow system clocks at startup and switches to a faster source of time for the remainder of the build. On affected machines we have measured build time improvements of up to 45%.

Builds on machines with a normal system clock are unaffected, and no change to configuration is required.

General improvements

Gradle provides various incremental updates and performance optimizations to ensure the continued reliability of the build ecosystem.

Faster Maven publishing with up-to-date POM generation

The GenerateMavenPom task was previously marked as untracked, so it executed on every build regardless of whether the underlying POM had changed.

The task now declares each part of its source POM as a task input, so it participates in up-to-date checks:

$ ./gradlew generatePomFileForMavenPublication
> Task :generatePomFileForMavenPublication UP-TO-DATE

BUILD SUCCESSFUL

When a withXml action is registered, task input tracking remains disabled, as withXml actions do not yet support snapshotting, so the task continues to run on every build. To restore up-to-date behavior, move the customization into the DSL properties on MavenPom where possible.

See the Generate POM task section in the Gradle User Manual for more details.

Promoted features are features that were incubating in previous versions of Gradle but are now supported and subject to backward compatibility. See the User Manual section on the "Feature Lifecycle" for more information.

The following are the features that have been promoted in this Gradle release.

Documentation and training

User Manual

The User Manual reference pages for the core plugins have been entirely rewritten for consistency and depth. The Core Plugin Reference index has also been reorganized and now lists previously missing core plugins.

Two new entries have been added to the Best Practices collection:

Fixed issues

Known issues

Known issues are problems that were discovered post-release that are directly related to changes made in this release.

External contributions

We love getting contributions from the Gradle community. For information on contributing, please see gradle.org/contribute.

Reporting problems

If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure if you're encountering a bug, please use the forum.

We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.