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

Chapter 2. Working with Repositories

In the previous chapter, you learned how to define dependencies for your project. Those dependencies are mostly stored somewhere in a repository or a directory structure. A repository usually has a structure to support different versions for the same dependency. Also, some metadata, such as the other dependencies for a module, is saved in the repository.

In our build files, we must define the location of a repository for our dependencies. We can mix different types of repositories, such as Maven and Ivy. We can even use a local filesystem as a repository. We will see how we can define and configure repositories in our build files.

Also, Gradle offers the option of configuring the repository layout, if the repository is using a custom layout. We will learn how to provide credentials for repositories with basic authentication.