Preface

When we write code in our Java or Groovy project, we mostly have dependencies on other projects or libraries. For example, we could use the Spring framework in our project, so we are dependent on classes found in the Spring framework. We want to be able to manage such dependencies from Gradle, our build automation tool.

We will see how we can define and customize the dependencies we need. We learn not only how to define the dependencies, but also how to work with repositories that store the dependencies. Next, we will see how to customize the way Gradle resolves dependencies.

Besides being dependent on other libraries, our project can also be a dependency for other projects. This means that we need to know how to deploy our project artifacts so that other developers can use it. We learn how to define artifacts and how to deploy them to, for example, a Maven or Ivy repository.

What this book covers

Chapter 1, Defining Dependencies, introduces dependency configurations as a way to organize dependencies. You will learn about the different types of dependencies in Gradle.

Chapter 2, Working with Repositories, covers how we can define repositories that store our dependencies. We will see not only how to set the location, but also the layout of a repository.

Chapter 3, Resolving Dependencies, is about how Gradle resolves our dependencies. You will learn how to customize the dependency resolution and resolve conflicts between dependencies.

Chapter 4, Publishing Artifacts, covers how to define artifacts for our project to be published as dependencies for others. We will see how to use configurations to define artifacts. We also use a local directory as a repository to publish the artifacts.

Chapter 5, Publishing to a Maven Repository, looks at how to publish our artifacts to a Maven repository. You will learn how to define a publication for a Maven-like repository, such as Artifactory or Nexus, and how to use the new and incubating publishing feature of Gradle.

Chapter 6, Publishing to Bintray, covers how to deploy our artifacts to Bintray. Bintray calls itself a Distribution as a Service and provides a low-level way to publish our artifacts to the world. In this chapter, we will look at how to use the Bintray Gradle plugin to publish our artifacts.

Chapter 7, Publishing to an Ivy Repository, is about publishing our artifacts to an Ivy repository. We will look into the different options to publish our artifacts to an Ivy repository, which is actually quite similar to publishing to a Maven repository.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.141.75