Gradle Release Notes

Version 4.1-milestone-1

The Gradle team is pleased to announce a first milestone release of Gradle 4.1.

This release now supports running Gradle on the most recent JDK 9 release (b170+). It also optimizes startup speed, positively affecting the execution time of every build.

Table Of Contents

New and noteworthy

Here are the new features introduced in this Gradle release.

Faster Gradle command line client

The Gradle command line client now starts up ~200ms faster, speeding up every build.

Continuous build now works with composite builds

Gradle's continuous build feature now works with composite builds. Gradle will automatically detect changes to any input from any build and rebuild the appropriate pieces.

CodeNarc plugin supports report format 'console'

The CodeNarc plugin now supports outputting reports directly to the console through the console report format.

codenarc { reportFormat = 'console' }

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

There are no promoted features in this release.

Fixed issues

Deprecations

There are no new deprecations in this release.

Potential breaking changes

Changes to handling of project dependencies from a project that does not use the Java plugin to a project that does

When a project that does not use the Java plugin has a project dependency on a project that uses the Java plugin, either directly or indirectly via another plugin, then the runtimeElements configuration of the target project will be selected. Previous versions of Gradle would select the default configuration in this case.

Previous versions of Gradle would select the runtimeElements when both projects are using the Java plugin.

This change makes the selection behaviour consistent so that the runtimeElements configuration is selected regardless of whether the consuming project uses the Java plugin or not. This is also consistent with the selection when the consuming project is using one of the Android plugins.

External contributions

We would like to thank the following community members for making contributions to this release of Gradle.

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

Known issues

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