diff options
Diffstat (limited to 'settings.gradle')
-rw-r--r-- | settings.gradle | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/settings.gradle b/settings.gradle index 8d4101493af..284b3f241d2 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,13 +1,19 @@ pluginManagement { repositories { + def artifactoryPassword = System.env.'ARTIFACTORY_PRIVATE_PASSWORD' + maven { - url 'https://repox.jfrog.io/repox/plugins.gradle.org/' - authentication { - header(HttpHeaderAuthentication) - } - credentials(HttpHeaderCredentials) { - name = "Authorization" - value = "Bearer $System.env.ARTIFACTORY_PRIVATE_PASSWORD" + if (artifactoryPassword) { + url 'https://repox.jfrog.io/repox/plugins.gradle.org/' + authentication { + header(HttpHeaderAuthentication) + } + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "Bearer $artifactoryPassword" + } + } else { + url 'https://plugins.gradle.org/m2/' } } } |