Chapter 5.  Dependency Management

When we develop our code, we usually use third-party or open source libraries. These libraries need to be available in the classpath of the compiler, otherwise we will get errors and our build will fail. Gradle provides support for dependency management, so we can define our dependencies in our build file. Gradle will then take care of the necessary configuration for our various tasks.

In this chapter, we will discuss how to use dependency management in our builds. We will see how to organize dependencies with configurations. We will also discuss repositories that host dependency artifacts, their dependencies, and how to handle different repository layouts.

Then, we will define dependencies using the Gradle syntax ...

Get Gradle Effective Implementations Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.