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 for modules with version information.