From db918ccd37635338b9ba9605493732d65e44237f Mon Sep 17 00:00:00 2001 From: finn Date: Thu, 18 Nov 2021 18:55:31 -0800 Subject: [PATCH] update gradle files --- build.gradle | 10 +--------- dependencies.gradle | 1 - service/build.gradle | 21 ++++++++++----------- settings.gradle | 2 +- 4 files changed, 12 insertions(+), 22 deletions(-) diff --git a/build.gradle b/build.gradle index 5a4cded..a1d8d70 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ buildscript { repositories { + maven {url "https://gitlab.com/api/v4/groups/6853927/-/packages/maven"} // https://gitlab.com/groups/signald/-/packages google() mavenCentral() } @@ -23,15 +24,6 @@ def getRepositoryPassword() { return hasProperty('whisperSonatypePassword') ? whisperSonatypePassword : "" } -nexusPublishing { - repositories { - sonatype { - username = getRepositoryUsername() - password = getRepositoryPassword() - } - } -} - subprojects { ext.lib_signal_service_version_number = "2.15.3_unofficial_34" ext.lib_signal_service_group_info = "com.github.turasa" diff --git a/dependencies.gradle b/dependencies.gradle index c1288ca..f32a970 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -9,7 +9,6 @@ dependencyResolutionManagement { // 1st Party alias('signal-client-java').to('org.whispersystems', 'signal-client-java').versionRef('signal-client') - alias('signal-client-android').to('org.whispersystems', 'signal-client-android').versionRef('signal-client') // Third Party alias('jackson-core').to('com.fasterxml.jackson.core:jackson-databind:2.9.9.2') diff --git a/service/build.gradle b/service/build.gradle index 98377c1..1fadd35 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -23,6 +23,7 @@ compileJava { } repositories { + maven {url "https://gitlab.com/api/v4/groups/6853927/-/packages/maven"} // https://gitlab.com/groups/signald/-/packages mavenCentral() mavenLocal() } @@ -103,8 +104,8 @@ def getRepositoryPassword() { publishing { publications { - mavenJava(MavenPublication) { - artifactId = 'signal-service-java' + library(MavenPublication) { + artifactId = 'signal-service-java'+ "-" + System.getenv("TARGET") from components.java pom { @@ -145,16 +146,14 @@ publishing { repositories { maven { - url = getReleaseRepositoryUrl() - credentials { - username getRepositoryUsername() - password getRepositoryPassword() + url System.getenv("CI_API_V4_URL") + "/projects/" + System.getenv("CI_PROJECT_ID") + "/packages/maven" + credentials(HttpHeaderCredentials) { + name = 'Job-Token' + value = System.getenv("CI_JOB_TOKEN") + } + authentication { + header(HttpHeaderAuthentication) } } } } - -signing { - required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } - sign publishing.publications.mavenJava -} diff --git a/settings.gradle b/settings.gradle index 8861c00..c180376 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,6 +1,6 @@ enableFeaturePreview('VERSION_CATALOGS') -include ':android' + include 'libsignal-service' project(':libsignal-service').projectDir = file('service') -- 2.20.1