Webinar: Dependency Management with Gradle - Part 1: Fundamentals


Whether you use a mono-repository or multi-repository approach for your sources, managing dependencies is central to productivity by reusing artifacts and ensuring a quality build. A single incorrect dependency can break existing code, introduce a vulnerability or simply prevent your project from building.

This class will introduce dependency management for Java. It will help you understand the key concepts and give you the knowledge to tackle many of the common requirements and pitfalls you will likely encounter. The topics covered include:

  • Declaring dependencies and the repositories you retrieve them from
  • Understanding what dependency configurations are
  • Using dependency versions to express requirements and compatibility
  • Using dependency constraints to control transitive dependency versions
  • Ensuring the same versions of dependency are used across projects within a build
  • Understanding the principles of variant-aware dependency management and the problems it solves
  • Discussing compatibility of Gradle’s dependency management with Apache Maven(™) and Apache Ivy(™)
  • Troubleshooting problems with dependencies


90 minute training session with Q&A.


Anyone getting started with Gradle, be they build masters or developers.


This course requires basic knowledge of the Gradle syntax.

Course Outline

Core Concepts

  • Introducing configurations and their different kinds
  • Declaring a dependency
  • Understanding transitive dependency
  • Declaring dependencies in the right configuration
  • Declaring repositories
    • Maven repositories
    • Ivy repositories
    • File repositories
    • The case for mavenLocal()
  • Introducing variants
  • Understanding the difference between compile classpath, runtime classpath, test classpath in terms of dependency resolution

Controlling Dependency Versions

  • Understanding what a version number means
  • Introducing dependency constraints
  • Comparing direct dependencies with dependency constraints
  • Understanding conflict resolution and how it differs from Apache Maven’s(™) behavior
  • Using dynamic versions and dependency locking

Structuring Your Build

  • Identifying where to declare dependencies
  • Sharing dependencies between modules with the Java Platform Plugin

Wrap Up

  • Documentation and Resources
  • Sneak peak at part 2: dealing with conflicts
  • Free Gradle Enterprise Trial

Meet the speakers

Cédric Champeau
Principal Software Engineer @ Gradle

Louis Jacomet
Lead Software Engineer @ Gradle


By registering for Gradle training, you agree to accept Gradle's terms and privacy policy.