diff options
author | Jacek Poreda <jacek.poreda@sonarsource.com> | 2024-01-29 17:20:11 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-01-30 15:02:02 +0000 |
commit | 3c923a113b98aa9c4ebacf5ceacf9b23160b1c99 (patch) | |
tree | 0799851c425b5992fecba6fba7821cc82f6db0b4 /settings.gradle | |
parent | b30ba54383fa653ee40c4b97b9d5c96106361b6a (diff) | |
download | sonarqube-3c923a113b98aa9c4ebacf5ceacf9b23160b1c99.tar.gz sonarqube-3c923a113b98aa9c4ebacf5ceacf9b23160b1c99.zip |
SONAR-21476 Fix public repository
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 1c1fa09fb5e..99c930014da 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/' } } } |