Closed rravi-sift closed 2 years ago
With the fix done in https://github.com/GoogleCloudPlatform/artifact-registry-maven-tools/issues/26 and by moving the plugin initialization to settings.gradle
as mentioned in https://github.com/GoogleCloudPlatform/artifact-registry-maven-tools#alternatives, the configuration time was reduced considerably.
When running a Gradle build with multiple sub-projects, we are noticing a considerable delay because the plugin authorizes with artifact registry in each module, and in each module, we see it first error out on ADC authorization and then fall back to
gcloud
.In the
DefaultCredentialProvider
, the ADC is tried first and on error, it falls back togcloud
credential. Is it possible to escape the ADC check and go directly togcloud
credentials?When setting credentials using
GOOGLE_APPLICATION_CREDENTIALS
(forcing ADC) the build step takes17s
. When usinggcloud auth activate-service-account
, the build takes 8 times longer. Because of the CI config we use, there is no option to setGOOGLE_APPLICATION_CREDENTIALS