Summary

In this chapter, you learned how to define repositories in your Gradle build scripts. You saw how to use predefined shortcut methods: jcenter, mavenCentral, and mavenLocal. To access a Maven repository at a custom location, we can use the url property and the maven method. When we configure an Ivy repository, we have the most control. We can specify a URL, and also the layout pattern of the repository. You learned that you can also use a flat directory repository in your build scripts.

You saw how to provide credentials for repositories with basic authentication. You now know how to save the username and password outside your build script. Finally, you learned how to use different transport protocols to access repositories.

In the next chapter, ...

Get Gradle Dependency Management now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.