How to provide alternative to "Gradle Libs" repositories?

When doing the standard dependency resolution the Gradle daemon outputs something like this:

Attempting to resolve component for commons
-collections:commons-collections:3.2.1 using repositories [maven]

The [maven] repositories can easily be overwritten by simple adding them in the “repositories” block of the build.gradle.

The problem comes when Gradle resolves dependencies for plugin development:
Attempting to resolve component for org.codehaus.groovy:groovy:3.0.9 using repositories [Gradle Libs]

Now the daemon tries to call https://repo.gradle.org/… which won’t work through our firewall.

How can I provide an alternative (internal) repository for when the deamon resolves dependencies through the “Gradle Libs” repository set ?

You can override the default URL for “Gradle Libs” by setting an environment variable called “GRADLE_LIBS_REPO_OVERRIDE”.

Thank you. I hope that this will be in the official documentation at some point.
I know there are several issues working towards that.
It is kinda hard to find and counter-intuitive since repository URL override works differently for plugins and other dependency resolution.

I hope that this will be in the official documentation at some point.

It already is, in the 8.5 docs. :slight_smile: