distributed100677782orig

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

PREVIOUS ARTICLE

« Ford remains wary of Tesla-like autonomous driving features

NEXT ARTICLE

Judge rejects Uber's settlement with drivers over employee classification »
author_image
IDG News Service

The IDG News Service is the world's leading daily source of global IT news, commentary and editorial resources. The News Service distributes content to IDG's more than 300 IT publications in more than 60 countries.

  • Mail

Recommended for You

International Women's Day: We've come a long way, but there's still an awfully long way to go

Charlotte Trueman takes a diverse look at today’s tech landscape.

Trump's trade war and the FANG bubble: Good news for Latin America?

Lewis Page gets down to business across global tech

20 Red-Hot, Pre-IPO companies to watch in 2019 B2B tech - Part 1

Martin Veitch's inside track on today’s tech trends

Poll

Do you think your smartphone is making you a workaholic?