Gradle 4.2 Released With Faster Build Times
Written by Alex Armstrong   
Thursday, 05 October 2017

The emphasis in the recently released Gradle 4.2 is improved support for building native applications, which has reduced build times for native performance by as much as half. Another highlight is the inclusion of Gradle Kotlin DSL. 



Performance improvements have been achieved in Gradle 4.2  in three ways:

  • Parallel native compilation and linking tasks
    Native compile and link tasks now execute in parallel by default, making native builds faster than ever. This means that when two (or more) compile or link tasks have no dependencies on each other, they can execute simultaneously (up to the max-workers limit for each Gradle invocation). The resulting performance improvement is highly dependent on project and component structure (for instance, the more inter-dependencies there are between components, the less opportunity there is to execute tasks in parallel) but in our testing, native build times have improved by as much as 50% or more. 

  • Faster zipTree and tarTree
    The zipTree and tarTree implementations had a major performance issue, unpacking files every time the tree was traversed. Build time has improved significantly due to avoiding redundant tree visitation.


  •  Reduced build cache overheads
    Thanks to efforts to ensure the build cache introduces very little overhead, builds that resolve all task outputs from the local build cache are up to 20% faster due to improvements in unpacking.


Gradle Kotlin DSL v0.11.1 is included in Gradle 4, which, according to its Release Notes:

brings the latest and greatest Kotlin (1.1.4-3) and takes big steps toward general usability with utilities for Groovy-heavy DSLs such as Maven POM customization, Ant usage and those provided by Groovy-biased community plugins.


There have also been improvements to the Kotlin DSL plug-in: 



Other enhancements include first-class support for Google Cloud Storage backed repositories allowing you to publish and consume using the ivy-publish and maven-publish plugins. This works similarly to Gradle's Amazon S3 support and samples in the user manual will help you use them.

Play framework support is also upgraded in Gradle 4.2 with Play v2.6, built-in Twirl template types and user-defined Twirl formats being supported. In addition this version introduces new on-demand rebuild and reload for PlayRun which is claimed to give a more pleasant development experience for some workflows.


If you are interested in using Gradle in the Android environment see Insider's Guide To Udacity Android Developer Nanodegree Part 4 - Build it Bigger in which I Programmer's Nikos Vagallis learns how to use Gradle to "turn a pile of source code and resources into a shipped, tested and functioning app".





More Information

Release Notes 

Related Articles

Gradle 2.0 Released

Insider's Guide To Udacity Android Developer Nanodegree Part 4 - Build it Bigger

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, Facebook or Linkedin.



Google Offers AI Help To Create Fantasy Creatures

Google has released a prototype AI-based tool called Chimera Painter that takes a basic sketch and turns it into a fantasy beast using machine learning.

Amazon Luna Goes Live

Amazon has launched Luna, a cloud gaming service that it says game developers can use to reach multiple endpoints from a single source.

More News






or email your comment to:



Last Updated ( Thursday, 05 October 2017 )