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. 

gradlebanner

 

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.

gradlebuild2

  •  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.

 gradlebuild1

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: 

gradleplugin

 

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".

 

 gradlelogosq

 

 

More Information

Gradle.org

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.

 

Banner


Rust And C++ Should Be Friends?
20/11/2024

The Rust Foundation has just released a statement on Rust and C++ interoperability and Google is ponying up $1 to see that it gets done.



Gifts For Geeks 2024
22/11/2024

Are you ready for Thanksgiving, when overeating remorse and a surfeit of being thankful causes the unsettling thought that there are only four weeks till the Xmas break? So here is a mix of weird [ ... ]


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

 

Last Updated ( Thursday, 05 October 2017 )