In real life, we work on a lot more complex applications than what we have just seen. Such applications rely on other specialized components to provide some functionality. For example, an Enterprise Java application's build may depend on various components such as open source libraries in Maven central, libraries developed and hosted in-house, and (maybe) even on another subprojects. Such dependencies are, themselves, located at various locations like, local intranet, local filesystem, and so on. They need to be resolved, downloaded, and brought into the appropriate configuration (such as
testCompile, and so on) of the build.
Gradle does an excellent job in locating and making dependencies available in the appropriate
classpath and packaging if required. Let's begin with the most common kind of dependencies—external libraries.