Browse Source
Previously, we called getCredentials() to determine whether or not a repository requires authentication. Unfortunately, the method has the unwanted side-effect of assigning empty username and password credentials to a repository that previously did not require authentication and did not, therefore, have any credentials. These empty credentials can then cause subsequent failures because "Username must not be null!". There's no side-effect-free public API for accessing a repository's credentials. Instead, we're using some internal API on AuthenticationSupportedInternal. If this causes problems when upgrading to a new version of Gradle a different approach will be required. For example, we could pass in the repositories in two separate collections: those that require authentication and those that don't. Closes gh-459503.3.x
1 changed files with 27 additions and 2 deletions
Loading…
Reference in new issue