diff options
author | jacquarg <guillaume.jacquart@hoodbrains.com> | 2021-11-08 10:22:46 +0100 |
---|---|---|
committer | jacquarg <guillaume.jacquart@hoodbrains.com> | 2021-11-08 10:22:46 +0100 |
commit | 95f0c8fb06bd1aa57702f56f2c736e9718597080 (patch) | |
tree | 2c824b88b4f944bddb8337c451796fa75a4fb933 /build.gradle | |
parent | 2d210ca863561ac68445e588d1405d9847716347 (diff) |
Use gitlab package registry instead of subprojects
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/build.gradle b/build.gradle index 63cdb08..f1ec9b7 100644 --- a/build.gradle +++ b/build.gradle @@ -56,7 +56,6 @@ allprojects { repositories { google() mavenCentral() - //mavenLocal() maven { url 'https://api.mapbox.com/downloads/v2/releases/maven' authentication { @@ -72,18 +71,35 @@ allprojects { } maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" } maven { url 'https://jitpack.io' } - maven { - url "https://gitlab.e.foundation/api/v4/groups/13662/-/packages/maven" - name "GitLab" - credentials(HttpHeaderCredentials) { - name = 'Private-Token' - value = gitLabPrivateToken + + def ciJobToken = System.getenv("CI_JOB_TOKEN") + def ciApiV4Url = System.getenv("CI_API_V4_URL") + if (ciJobToken != null) { + maven { + url "${ciApiV4Url}/groups/13662/-/packages/maven" + name "GitLab" + credentials(HttpHeaderCredentials) { + name = 'Job-Token' + value = ciJobToken + } + authentication { + header(HttpHeaderAuthentication) + } } - authentication { - header(HttpHeaderAuthentication) + } else { + mavenLocal() + maven { + url "https://gitlab.e.foundation/api/v4/groups/13662/-/packages/maven" + name "GitLab" + credentials(HttpHeaderCredentials) { + name = 'Private-Token' + value = gitLabPrivateToken + } + authentication { + header(HttpHeaderAuthentication) + } } } - maven { url '../embeddedmavenrepository/'} } } |