Custom Repositories - repo.gradle.org

I have a private repository setup in settings.gradle.kts for pluginManagment.repositories, pluginManagement.buildscript.repositories, and dependencyResolutionManagement.repositories for my buildScript and my project.

Almost all my dependencies are loaded from the configured repository. However, without finding any missing dependencies, and without having gradlePluginPortal() defined, I have a bunch of accesses to repo.gradle.org looking for groovy dependencies.

It appears that repo.gradle.org is blocked by my organization (it’s proxied by the private repo). These downloads fail and break my build. This is with gradle 10 - 10.2.

Why is it attempting to load dependencies from repo.gradle.org, and how can I fix it so it uses the private repository?

Actually, it looks like builds are ok, it’s just syncing in Android Studio that throws warnings.

Iirc this is coming from a semi-hard-coded repository where the sources for the Gradle API are resolved from which also is the reason it only happens on IDE sync.

“semi”, because you can override the repository using GRADLE_LIBS_REPO_OVERRIDE.

That appears to be correct. However, you cannot set username or password for this repository. So the url can be changed, but my repo requires authentication, so it’s worthless. Apparently someone submitted a PR to fix this by allowing credentials through gradle properties, but it was rejected.

:confused:

There were even two PRs doing the same. Well, we have to wait for the proper fix then that is hopefully coming in Gradle 9.x, it seems. :man_shrugging: