diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/build.gradle b/build.gradle index 431cb948799..23d4fd0fa2f 100644 --- a/build.gradle +++ b/build.gradle @@ -73,21 +73,28 @@ allprojects { throw new GradleException('Invalid artifactoryUrl') } - maven { - if (artifactoryPassword) { - authentication { - header(HttpHeaderAuthentication) - } - credentials(HttpHeaderCredentials) { - name = "Authorization" - value = "Bearer $artifactoryPassword" - } - } else { - // Workaround for artifactory - // https://www.jfrog.com/jira/browse/RTFACT-13797 - repository = 'public' + if (artifactoryPassword) { + if (artifactoryUrl == '') { + throw new GradleException('Invalid artifactoryUrl') + } + maven { + authentication { + header(HttpHeaderAuthentication) + } + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "Bearer $artifactoryPassword" } url "${artifactoryUrl}/${repository}" + } + } else { + mavenCentral() + maven { + url 'https://jitpack.io' + } + maven { + url 'https://maven.codelibs.org/' + } } ivy { if (artifactoryUsername && artifactoryPassword) { |