Skip to content

@eriwen eriwen released this Jun 14, 2017 · 23392 commits to master since this release

The Gradle team is pleased to announce Gradle 4.0.

We are excited to share some great new features and improvements with you in this release:

First and foremost, Gradle's Build Cache is now production-ready for Java and Groovy compilation and Java test tasks! This provides remarkable performance, making Gradle builds up to 100x faster than Maven in common scenarios. This is further improved by overlapping outputs detection, configurable classpath normalization that avoids unnecessary task execution, and more listed in the full release notes. The cacheability of other tasks, including other languages, will be completed in future releases. We invite you to check out our new guide for maximizing effectiveness of the Gradle Build Cache.

Now on to user experience: this release has a number of enhancements in logging and terminal display. Log output is now grouped by project and task when attached to a terminal — output from tasks run in parallel will no longer be interleaved. However, logging behaves the same as previous Gradle versions in non-interactive environments, and with --console=plain, to allow automated tools like CI systems to parse the logs they expect.

4 0-console-2

The console output now shows more detail about what exactly is in-progress, and parallel work in-progress is now displayed by default. You can learn more about logging and console output in the user guide.

4 0-console-take5

Speaking of parallel work-in-progress, artifacts and metadata from remote repositories are now downloaded in parallel! Gradle also avoids downloading the same dependency twice even if parallel tasks request the same one simultaneously.

Gradle Script Kotlin v0.9.0 (included in this release) brings very welcome improvements: auto-detection of Kotlin build scripts, default imports for the whole Gradle API, improved samples and docs with an API reference, better IntelliJ experience and more!

Finally, this release introduces a public type that represents lazily-evaluated properties (aka ConventionMapping). This is one of the most-requested features by plugin authors. You can learn more about PropertyStates here. A good example of their usage can be found in the gradle-site-plugin.

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

Upgrade Instructions

Switch your build to use Gradle 4.0 quickly by updating your wrapper properties:

./gradlew wrapper --gradle-version=4.0

Standalone downloads are available at

Reporting Problems

If you find a problem with Gradle 4.0, 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.

Assets 2
You can’t perform that action at this time.