diff options
-rw-r--r-- | build.gradle | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/build.gradle b/build.gradle index db4bea40eb9..848b4e95276 100644 --- a/build.gradle +++ b/build.gradle @@ -74,14 +74,11 @@ allprojects { } maven { - if (artifactoryPassword) { - authentication { - header(HttpHeaderAuthentication) - } - credentials(HttpHeaderCredentials) { - name = "Authorization" - value = "Bearer $artifactoryPassword" - } + if (artifactoryUsername && artifactoryPassword) { + credentials { + username artifactoryUsername + password artifactoryPassword + } } else { // Workaround for artifactory // https://www.jfrog.com/jira/browse/RTFACT-13797 @@ -91,14 +88,11 @@ allprojects { } ivy { if (artifactoryUsername && artifactoryPassword) { - url "${artifactoryUrl}/sonarsource-bucket" - authentication { - header(HttpHeaderAuthentication) - } - credentials(HttpHeaderCredentials) { - name = "Authorization" - value = "Bearer $artifactoryPassword" + credentials { + username artifactoryUsername + password artifactoryPassword } + url "${artifactoryUrl}/sonarsource-bucket" patternLayout { artifact '/[organisation]/[module]/[module]-[revision].[ext]' |