Gradle 4.2 Is Released

| by Amit K Gupta Follow 5 Followers on Sep 30, 2017. Estimated reading time: 1 minute |

A note to our readers: You asked so we have developed a set of features that allow you to reduce the noise: you can get email and web notifications for topics you are interested in. Learn more about our new features.

Gradle recently released version 4.2 of their build tool, featuring some major additions. One significant addition is parallel task execution for native compilation and linking tasks. InfoQ asked Eric Wendelin, principal engineer at Gradle, about this feature:

Gradle's worker API provides a mechanism for executing tasks in parallel; this reduces overall build time by maximizing CPU utilization. The worker API is used in Gradle 4.2 to execute C/C++/Swift compilation and linking tasks by default. In other words, parallel task execution is on by default for only native tasks, and not yet on by default for other technologies like Java, though I should note that some Gradle plugins are using this to parallelize work for their ecosystem.

Wendelin added that existing projects will benefit from upgrading to the latest version as Gradle 4.2 provides improved performance, notably for the projects that use remote script plugins. Gradle 4.2 also provides faster build cache unpacking and builds that process archives with zipTree and tarTree.

The following chart from the Gradle website shows the performance improvements in v4.2 over v4.1

Gradle 4.2 includes a few new APIs for plugin authors, including nested DSL elements, declaring the output of a task as a publish artifact, and Groovy DSL support for properties of type PropertyState. According to Wendelin:

Most notable are a new ObjectFactory API for creating nested DSL elements and a DSL expansion to allow a plugin author to declare a given file or directory as an output of a project.

Other notable features of 4.2 are enhancements to Kotlin DSL, support for Google Cloud Storage repositories, and support for Play v2.6, custom Twirl templates and on-demand rebuild for PlayRun tasks.

Support for running Gradle on Java 7 is deprecated and will be removed in Gradle 5.0.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you