Book Image

Gradle Dependency Management

By : Hubert Klein Ikkink
Book Image

Gradle Dependency Management

By: Hubert Klein Ikkink

Overview of this book

Table of Contents (14 chapters)
Gradle Dependency Management
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Understanding dependency resolution


Gradle will use the information in the repositories and dependencies configuration blocks to gather and download all dependencies. This process is also called dependency resolution. The following steps are taken by Gradle to resolve dependencies:

  1. The module descriptor file for a dependency is searched in the defined repositories. The order of the repository definitions is used for searching. So, repositories defined before other repositories are searched first, and so on. If a POM or Ivy descriptor file is found, it is used. If no descriptor file is found, then the artifact file for the dependency is searched. If either the descriptor file or the artifact file is found, then Gradle knows this repository can be used to download the dependencies.

    • If a POM descriptor file is found with a parent POM descriptor file, then the parent POM is resolved by Gradle.

    • A dynamic version, like 4.1.+, is resolved to the highest available static version in the repository....