Gradle Summit - June 22 - 23, 2017 - No Fluff Just Stuff

Multi-repo development with Composite Builds

Gradle Summit

Palo Alto · June 22 - 23, 2017

You are viewing details from a past event

About this Presentation

Working with large projects across multiple teams requires a modular approach to software development, but traditional developer tooling hasn't made it easy. Working with code located in multiple repositories tends to be cumbersome, and at times painful.

Gradle Composite Builds aim to ease some of this pain, by allowing you to combine multiple independent Gradle builds into an integrated whole.

This presentation will demonstrate the use of Composite Builds to modularize a monolithic software project and to work on code living across multiple repositories. With a few simple techniques, you'll learn how to use composite builds to streamline your multi-repository development, from IDEs to CI pipelines.

What are composite builds?

Composite Builds allow you to combine multiple independent Gradle builds into a single integrated build. Binary dependencies are automatically replaced with project dependencies, and when you make a change to an upstream component, it is immediately visible to its dependents. You can import composite builds into the IDE and work on them as if you were looking at a single code base.

Composite builds also simplify the process of splitting a large mono-repo into smaller parts that can be worked on individually. This makes the migration path toward separated repositories simple. And thanks to Gradle's rich DSL, you can compose builds dynamically.

What you'll learn

Starting with a monolithic mono-repo application, this presentation will demonstrate how composite builds can be used in a number of common development scenarios:

  • Debug and patch an upstream dependency that lives in a separate repository
  • Extract and publish a library dependency from a monolithic application
  • Extract and publish a Gradle plugin from custom build logic
  • Compose a workspace for co-development of several separate Gradle projects
Daz DeBoer

Composite Builds Team Lead at Gradle

Daz has been a core member of the Gradle Inc. engineering team for over 6 years, helping take Gradle from an early-adopters tool into the mainstream. Over this time, he has been deeply involved in the delivery of a number of key features, including the improved dependency resolution cache, parallel build execution, and support for building native apps with Gradle.

Most recently, Daz has driven the design and implementation of 'Composite Builds' support in Gradle, providing a flexible mechanism for combining multiple Gradle builds into a single composite.