The Gradle team is pleased to announce Gradle 4.0-rc-1.
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 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.
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.
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.
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.
Switch your build to use Gradle 4.0 RC1 quickly by updating your wrapper properties:
./gradlew wrapper --gradle-version=4.0-rc-1
Standalone downloads are available at https://gradle.org/release-candidate.