Gradle Release Notes

Version 8.0-milestone-4

The Gradle team is excited to announce Gradle 8.0-milestone-4.

This release features 1, 2, ... n, and more.

We would like to thank the following community members for their contributions to this release of Gradle:

Andrei Nevedomskii, Björn Kautler, Clara Guerrero, David Marin, Denis Buzmakov, Dmitry Pogrebnoy, Dzmitry Neviadomski, Eliezer Graber, Fedor Ihnatkevich, Gabriel Rodriguez, Guruprasad Bagade, Herbert von Broeuschmeul, Matthew Haughton, Michael Torres, Pankaj Kumar, Ricardo Jiang, Siddardha Bezawada, Stephen Topley, Victor Maldonado, Vinay Potluri, Jeff Gaston, David Morris.

Table Of Contents

Upgrade instructions

Switch your build to use Gradle 8.0-milestone-4 by updating your wrapper:

./gradlew wrapper --gradle-version=8.0-milestone-4

See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 8.0-milestone-4.

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

New features and usability improvements

Warning modes all and fail are more verbose

Warning modes that are supposed to print all warnings were printing only one for each specific warning message. If there were two warnings with the same message, but originating from different steps of the build process (i.e. different stack traces), only one of them was printed. Now one gets printed for each combination of message and stack trace.

PMD and CodeNarc tasks execute in parallel by default

The PMD and CodeNarc plugins now use the Gradle worker API and JVM toolchains. These tools now perform analysis via an external worker process and therefore their tasks may now run in parallel within one project.

In Java projects, these tools will use the same version of Java required by the project. In other types of projects, they will use the same version of Java that is used by the Gradle daemon.

CodeNarc Plugin automatically detects appropriate version for current Groovy runtime

The CodeNarc project now publishes separate versions for use with Groovy 4. Gradle still currently ships with Groovy 3. To ensure future compatibility, the CodeNarcPlugin now automatically detects the appropriate version of CodeNarc for the current Groovy runtime. You can still explicitly specify a CodeNarc version with the toolVersion property on the CodeNarcExtension.

Introduced projectInternalView() dependency for test suites with access to project internals

The JVM test suite dependencies block now supports depending on the internal view of the current project at compile-time. Previously it was only possible to depend on the current project's API. This allows test suites to access project internals that are not declared on the api or compileOnlyApi configurations. This functionality can be useful when testing internal classes that use dependencies which are not exposed as part of a project's API, like those declared on the implementation and compileOnly configurations.

For example, the following snippet uses the new projectInternalView() API to define a test suite with access to project internals:

testing {
    suites {
        val unitLikeTestSuite by registering(JvmTestSuite::class) {
            useJUnitJupiter()
            dependencies {
                implementation(projectInternalView())
            }
        }
    }
}

Dependency verification metadata improvements

The following nodes with dependency verification metadata file verification-metadata.xml now support a reason attribute:

Dependency verification CLI improvements

You can now use the export-keys flag to export all already trusted keys:

./gradlew --export-keys

For more information, see Exporting keys.

Promoted features are features that were incubating in previous versions of Gradle but are now supported and subject to backwards 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.

The following type and method are now considered stable:

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 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.