CI/CD / Development / Tools

LinkedIn Brings Gradle Build Automation to Python

17 Aug 2016 10:29am, by

LinkedIn’s newly opened source Python plugin for Gradle, {py}gradle, further expands the ecosystem for the build automation technology.

LinkedIn uses Gradle to pull together dependencies in 42 different programming languages in its process of executing 300,000 builds a week.

It calls {py}gradle an enhancement rather than a replacement for Setuptools — a Python core library for managing dependencies, encode build steps, specify output distributions and more.

While Setuptools works well for self-contained Python applications with a small set of external dependencies, it didn’t fully meet LinkedIn’s needs, senior staff software engineer Stephen Holsapple wrote in a blog post.

Gradle’s dependency management makes them explorable by external systems and teams; allows the company to reuse logic from metadata for things like code review, integration testing and deployment; and build projects involving multiple programming languages.

Heavyweight Input

In the old days, the build process was a “humble” task of just compile and link on a single “microcomputer,” explained Miko Matsumura, Gradle’s chief marketing officer.

Today’s developers, however, might be using a dozen different open source libraries.

“Its origin was ‘I just want to compile this and get it to run.’ But [that] has turned into a complex upstream and downstream phenomenon,” Matsumura said.

“What does ‘to run’ even mean? I want it to run in this container environment, in this client environment. I want it to run in iOS and in Android, on big screens and little screens. So this idea ‘to run’ isn’t what it used to be.

“Now just getting it to run turns into this complex graph of integration, automation and testing — there’s just a ton of things to be done, especially if you’re trying to get to continuous delivery,” he said.

The German-based consultancy Gradleware moved to San Francisco because it was gaining traction with Internet heavyweights like LinkedIn that are putting millions into developing out the technology going into the open source Gradle project. In addition to LinkedIn, it’s working with Google, Netflix, game development platform Unity, and others.

Google in 2013 made Gradle the build system of choice for Android applications.

Today, Gradle has more than 800 plugins — LinkedIn also open sourced its Hadoop plugin — and supports IDEs including Eclipse, Android Studio and IntelliJ and DevOps tools including Jenkins, Chef, Puppet, Docker, and Ansible.

It handles transitive dependencies across multiple repository types including Maven, Ivy and flat files.

Maven vs. Ant vs. Gradle

Gradle’s founder, Hans Dockter created the Groovy-based language in Germany after becoming frustrated with trying to automate build tasks in XML using Maven. He teamed up with Australian Adam Murdoch to found the company, though the two had never met. Gradle has been open source since its 1.0 release in 2008.

The company announced a $4.2 million seed round last December from Data Collective and True Ventures.

Gradle continues to grow, but so far isn’t significantly challenging Maven, according to ZeroTurnaround surveys of Java tools.

In its 2014 poll, 58 percent of developers cited Gradle as the technology they’d most like to learn more about. In its 2016 report, however, 68 percent of developers named Maven as their most-used build tool, while 16 percent cited Gradle and 11 percent said Ant, Google’s previous tool of choice for Android.

In a ZeroTurnaround comparison of Maven, Ant, and Gradle from 2014, Gradle won out on a short learning curve, simplicity, community and documentation and other factors. However, it chose Maven on build speed and number of dev tool integrations, both issues Gradle has been addressing.

Ant and Gradle have similar DNA, according to Matsumura.

“Ant is infinitely scriptable. It has incredible flexibility. Maven is inflexible but has super-powerful declarative expressiveness. You can say something simple in Maven and because of convention in the industry, it will interpret what you mean,” he said. “Ant does not make any assumptions about what you’re trying to do. It means you have to explicitly and in painful detail tell Ant what you want to happen.

“Hans’ domain-specific language combines the flexibility of Ant with this domain expressiveness of Maven. When you say something in Gradle, it’s pretty close to human readable. You can say something in a few lines of code, where in Ant, it would take thousands of lines of code,” he said.

The release of Gradle 3.0 in June included support for Java 9 and the Kotlin programming language.

The company, however, is moving beyond its Java roots.

“We’re becoming more polyglot,” Matsumura said. “We’re realizing there are few development shops anymore that are just Java or XYZ or whatever.”

A newsletter digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.