libsignal-service-java/libsignal-service-java.patch
2022-04-26 17:25:45 -07:00

156 lines
5.9 KiB
Diff

From 603b26fe4daacdfecc04d612bc095916f65b8b06 Mon Sep 17 00:00:00 2001
From: nobody <nobody@signald.org>
Date: Tue, 26 Apr 2022 17:25:06 -0700
Subject: [PATCH] update gradle files
---
build.gradle | 17 ++---------------
dependencies.gradle | 3 +--
gradle/verification-metadata.xml | 14 ++++++++------
service/build.gradle | 19 +++++++++----------
settings.gradle | 2 --
5 files changed, 20 insertions(+), 35 deletions(-)
diff --git a/build.gradle b/build.gradle
index 638912f..dbbfce9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -9,11 +9,7 @@ buildscript {
}
}
-plugins {
- id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
-}
-
-project.group = "com.github.turasa"
+project.group = "org.signald"
def getRepositoryUsername() {
return hasProperty('whisperSonatypeUsername') ? whisperSonatypeUsername : ""
@@ -23,18 +19,9 @@ def getRepositoryPassword() {
return hasProperty('whisperSonatypePassword') ? whisperSonatypePassword : ""
}
-nexusPublishing {
- repositories {
- sonatype {
- username = getRepositoryUsername()
- password = getRepositoryPassword()
- }
- }
-}
-
subprojects {
ext.lib_signal_service_version_number = "2.15.3_unofficial_47"
- ext.lib_signal_service_group_info = "com.github.turasa"
+ ext.lib_signal_service_group_info = "org.signald"
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
diff --git a/dependencies.gradle b/dependencies.gradle
index 0db5725..03f925a 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -8,8 +8,7 @@ dependencyResolutionManagement {
alias('google-libphonenumber').to('com.googlecode.libphonenumber:libphonenumber:8.12.33')
// 1st Party
- alias('libsignal-client').to('org.signal', 'libsignal-client').versionRef('libsignal-client')
- alias('libsignal-android').to('org.signal', 'libsignal-android').versionRef('libsignal-client')
+ alias('libsignal-client').to('org.signald', 'libsignal-client-' + System.getenv("TARGET")).versionRef('libsignal-client')
// Third Party
alias('jackson-core').to('com.fasterxml.jackson.core:jackson-databind:2.13.0')
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index 83ef67a..bc01fa8 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -482,6 +482,9 @@
<artifact name="protoc-3.18.0-linux-x86_64.exe">
<sha256 value="e977a0b300a3b0c7c0135a02b8a4d746081e1cd8946ea747e0247412535692fe" origin="Generated by Gradle"/>
</artifact>
+ <artifact name="protoc-3.18.0-osx-x86_64.exe">
+ <sha256 value="956241e25cac149cf8d01d4f9125f2913b3bc471deea6856231367cdf4be71a4" origin="Generated by Gradle"/>
+ </artifact>
</component>
<component group="com.google.testing.platform" name="core-proto" version="0.0.8-alpha04">
<artifact name="core-proto-0.0.8-alpha04.jar">
@@ -1133,12 +1136,11 @@
<sha256 value="e0ad9cb0073a699fce187d527bb1d423a9082fb7a2f75e1fbf89fef6fb880cec" origin="Generated by Gradle"/>
</artifact>
</component>
- <component group="org.signal" name="libsignal-client" version="0.15.0">
- <artifact name="libsignal-client-0.15.0.jar">
- <sha256 value="dfbd132106ef6dbd4355043355a47132874bccbf0d42c85350686013084b953c" origin="Generated by Gradle"/>
- </artifact>
- <artifact name="libsignal-client-0.15.0.module">
- <sha256 value="76625d04c538f791275cb34870ed7805c09fb3a6f3deb3a256e13a48ef440fde" origin="Generated by Gradle"/>
+ <component group="org.signald" name="libsignal-client-{TARGET}" version="0.15.0">
+ <artifact name="libsignal-client-{TARGET}-0.15.0.jar">
+ <sha256 value="{TARGET_JAR_SHA256}" origin="Generated by Gradle"/>
+ <artifact name="libsignal-client-{TARGET}-0.15.0.module">
+ <sha256 value="{TARGET_MODULE_SHA256}" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.tensorflow" name="tensorflow-lite-metadata" version="0.1.0-rc2">
diff --git a/service/build.gradle b/service/build.gradle
index ae4df43..4b0240d 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -21,6 +21,7 @@ compileJava {
}
repositories {
+ maven {url "https://gitlab.com/api/v4/groups/6853927/-/packages/maven"} // https://gitlab.com/groups/signald/-/packages
mavenCentral()
mavenLocal()
}
@@ -98,7 +99,7 @@ def getRepositoryPassword() {
publishing {
publications {
mavenJava(MavenPublication) {
- artifactId = 'signal-service-java'
+ artifactId = 'signal-service-java-' + System.getenv("TARGET")
from components.java
pom {
@@ -139,16 +140,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..4048aab 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,7 +1,5 @@
enableFeaturePreview('VERSION_CATALOGS')
-include ':android'
-
include 'libsignal-service'
project(':libsignal-service').projectDir = file('service')
--
2.30.2