Gradle build sharing comes out of the cradle

Gradle build sharing comes out of the cradle

Gradle, the popular build automation system perhaps best known for its use in Android mobile app development, is set to formally add distributed cache capabilities later this year, for deploying shared builds.

"With a distributed cache, builds are no longer isolated; the output of a build can be shared among developers," said Hans Dockter, who developed Gradle and is CEO of Gradle Inc. "That's a key feature for making builds -- especially when you have bigger teams -- much faster," he said when interviewed at a Silicon Valley Java User Group meeting this week.

While the distributed cache already exists as an experimental feature, a production-ready version is projected for fourth-quarter general availability, possibly in Gradle 3.3. In a 2015 blog post, Dockter said the base concept of a distributed cache is that every task is a deterministic function from input to output. "In the case of compilation, for example, the input is not only the source code, but also the version and the type of compiler, and the OS being used," he said. "When all of those parameters are captured, the cache output can be reliably shared across machines."

Dockter also noted "feature creep" between build tools like Gradle and continuous integration (CI) systems like Jenkins, which overlap in functions like report generation and integration testing. A CI product needs to support different build systems, and some build systems have deficiencies, so a system like Gradle can add functionality that developers can use in lieu of the CI product, he said. While CI merges code from multiple developers, a tool like Gradle can automate the building of applications from code.

Gradle 3.0, featuring faster builds, was released on Aug. 15 and adds JetBrains' Kotlin language as an option for scripting, which gets initial support in the 3.0 release. Previously, this capability was reserved for a Groovy DSL, which is still supported. Dockter noted that Kotlin is more suitable for IDE support, is scripting-friendly, and is statically compiled, so it's easier to maintain complex build logic.

While Kotlin has been enabled in Gradle, it is not yet stable, and Kotlin-based Gradle builds written now might not work with the next version of Gradle. The feature is expected to be stabilized and production-ready by the end of the year. Gradle earlier this week also gained a capability to execute builds of Python code via LinkedIn's open source {py}gradle plugin.

IDG Insider


«Aukey Eye-Care LED desk lamp review: This little light doesn't shine


Keep using password managers -- bugs and all»
IDG Connect

IDG Connect tackles the tech stories that matter to you

Add Your Comment

Most Recent Comments

Our Case Studies

IDG Connect delivers full creative solutions to meet all your demand generatlon needs. These cover the full scope of options, from customized content and lead delivery through to fully integrated campaigns.


Our Marketing Research

Our in-house analyst and editorial team create a range of insights for the global marketing community. These look at IT buying preferences, the latest soclal media trends and other zeitgeist topics.



Should the government regulate Artificial Intelligence?