libsignal-service-java/libsignal-service-java.patch
finn 4bc11f17a0 update to unofficial_38
some slightly different patching requirements
2022-01-24 18:52:38 -08:00

172 lines
6.2 KiB
Diff

From 15483c7c0a29067bad3752cdaa12634beb351995 Mon Sep 17 00:00:00 2001
From: signald <nobody@signald.org>
Date: Sat, 15 Jan 2022 17:34:03 -0800
Subject: [PATCH] update gradle files
---
build.gradle | 18 +++---------------
dependencies.gradle | 3 +--
gradle/verification-metadata.xml | 12 +++++++++---
service/build.gradle | 24 +++++++++++-------------
settings.gradle | 1 -
5 files changed, 24 insertions(+), 34 deletions(-)
diff --git a/build.gradle b/build.gradle
index 818516d..2083332 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()
}
@@ -9,11 +10,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 +20,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_38"
- 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 c3a0278..b28c32d 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('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')
+ alias('signal-client-java').to('org.whispersystems', 'signal-client-java-' + System.getenv("TARGET")).versionRef('signal-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 447b720..5fa2f62 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -477,6 +477,9 @@
<artifact name="protoc-3.10.0-linux-x86_64.exe">
<sha256 value="eed3ea189a99e3ad4e4209332e7161b255dc8f39bbde4c8e9fc25535f0f6f4f5" origin="Generated by Gradle"/>
</artifact>
+ <artifact name="protoc-3.10.0-osx-x86_64.exe">
+ <sha256 value="a73d5bc8a2a4ab2a541901aa5ce81beacf8a7be5635be06a99c88f5ec10e840f" 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">
@@ -1140,9 +1143,12 @@
<sha256 value="970c62e785f9364860a6cba69e481d2d4b830827e616eec470b5dd29410753f1" origin="Generated by Gradle"/>
</artifact>
</component>
- <component group="org.whispersystems" name="signal-client-java" version="0.11.0">
- <artifact name="signal-client-java-0.11.0.jar">
- <sha256 value="7bd19ccfbfc9c0f98c80aafc44bedc18706ab2e142e257e91f592bf9cbbd070a" origin="Generated by Gradle"/>
+ <component group="org.whispersystems" name="signal-client-java-{TARGET}" version="0.11.0">
+ <artifact name="signal-client-java-{TARGET}-0.11.0.jar">
+ <sha256 value="{TARGET_JAR_SHA256}" origin="Generated by Gradle"/>
+ </artifact>
+ <artifact name="signal-client-java-{TARGET}-0.11.0.module">
+ <sha256 value="{TARGET_MODULE_SHA256}" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="xerces" name="xercesImpl" version="2.12.0">
diff --git a/service/build.gradle b/service/build.gradle
index 076cf4b..817cbf1 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()
}
@@ -74,7 +75,6 @@ protobuf {
idea {
module {
generatedSourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java")
- scopes.COMPILE.plus += [configurations.ideaTestFixturesImplementation]
}
}
@@ -97,8 +97,8 @@ def getRepositoryPassword() {
publishing {
publications {
- mavenJava(MavenPublication) {
- artifactId = 'signal-service-java'
+ library(MavenPublication) {
+ artifactId = 'signal-service-java-' + System.getenv("TARGET")
from components.java
pom {
@@ -139,16 +139,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
-}
+}
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 8861c00..8dd0342 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,6 +1,5 @@
enableFeaturePreview('VERSION_CATALOGS')
-include ':android'
include 'libsignal-service'
project(':libsignal-service').projectDir = file('service')
--
2.30.2