libsignal-client/libsignal.patch

122 lines
3.6 KiB
Diff
Raw Normal View History

2022-08-02 22:08:29 +00:00
From ba6c862c64068882477292e5b3a798604a26c3c3 Mon Sep 17 00:00:00 2001
2021-10-15 07:26:35 +00:00
From: signald <nobody@signald.org>
2022-08-02 22:08:29 +00:00
Date: Tue, 2 Aug 2022 15:07:16 -0700
2022-06-16 19:49:12 +00:00
Subject: [PATCH] update build files
2021-10-15 07:26:35 +00:00
---
2022-03-21 23:12:19 +00:00
java/build.gradle | 9 +--------
2022-08-02 22:08:29 +00:00
java/client/build.gradle | 30 ++++++++----------------------
2022-04-06 18:23:15 +00:00
java/settings.gradle | 11 +----------
2022-08-02 22:08:29 +00:00
3 files changed, 10 insertions(+), 40 deletions(-)
2021-10-15 07:26:35 +00:00
diff --git a/java/build.gradle b/java/build.gradle
2022-08-02 22:08:29 +00:00
index 2f9e3915..cbf85f28 100644
2021-10-15 07:26:35 +00:00
--- a/java/build.gradle
+++ b/java/build.gradle
2022-08-02 22:08:29 +00:00
@@ -6,7 +6,7 @@ def version_number = "0.18.1"
2022-03-21 23:12:19 +00:00
2022-02-12 06:51:17 +00:00
subprojects {
2022-03-21 23:12:19 +00:00
ext.version_number = version_number
2022-04-06 18:23:15 +00:00
- ext.group_info = "org.signal"
2022-02-12 06:51:17 +00:00
+ ext.group_info = "org.signald"
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
2022-08-02 22:08:29 +00:00
@@ -37,13 +37,6 @@ task makeJniLibrariesDesktop(type:Exec) {
2022-03-21 23:12:19 +00:00
commandLine './build_jni.sh', 'desktop'
2021-11-19 01:55:16 +00:00
}
-task makeAll() {
- group 'Rust'
- description 'Build the native libraries'
-
2021-10-24 19:47:40 +00:00
- dependsOn 'makeJniLibrariesDesktop', 'makeJniLibrariesAndroid'
-}
2022-03-21 23:12:19 +00:00
-
task cargoClean(type:Exec) {
group 'Rust'
commandLine 'cargo', 'clean'
diff --git a/java/client/build.gradle b/java/client/build.gradle
2022-08-02 22:08:29 +00:00
index 7ee6b154..ededcff2 100644
2022-03-21 23:12:19 +00:00
--- a/java/client/build.gradle
+++ b/java/client/build.gradle
@@ -1,7 +1,6 @@
2021-11-19 01:55:16 +00:00
plugins {
2022-03-21 23:12:19 +00:00
id 'java-library'
id 'maven-publish'
- id 'signing'
}
2022-03-21 23:12:19 +00:00
sourceCompatibility = 1.8
2022-08-02 22:08:29 +00:00
@@ -46,23 +45,12 @@ java {
2022-03-21 23:12:19 +00:00
withJavadocJar()
2021-10-15 07:26:35 +00:00
}
2022-03-21 23:12:19 +00:00
-processResources {
- // TODO: Build a different variant of the JNI library for server.
- dependsOn ':makeJniLibrariesDesktop'
2022-04-06 18:23:15 +00:00
- dependsOn ':downloadNonLinuxLibraries'
- gradle.taskGraph.whenReady { graph ->
- if (graph.hasTask(":client:publish")) {
- tasks.getByPath(":downloadNonLinuxLibraries").enabled = true
- }
- }
-}
2022-08-02 22:08:29 +00:00
-
2022-03-21 23:12:19 +00:00
// MARK: Publishing
publishing {
publications {
mavenJava(MavenPublication) {
- artifactId = archivesBaseName
2021-11-19 01:55:16 +00:00
+ artifactId = archivesBaseName + "-" + System.getenv("TARGET")
2022-03-21 23:12:19 +00:00
from components.java
pom {
2022-08-02 22:08:29 +00:00
@@ -93,16 +81,14 @@ publishing {
2021-11-19 01:55:16 +00:00
}
repositories {
2022-03-21 23:12:19 +00:00
maven {
- url = getReleaseRepositoryUrl()
- credentials {
- username = getRepositoryUsername()
- password = getRepositoryPassword()
2021-10-15 07:26:35 +00:00
+ 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)
2022-03-21 23:12:19 +00:00
}
2021-11-19 01:55:16 +00:00
}
}
2022-06-16 19:49:12 +00:00
}
2022-08-02 22:08:29 +00:00
-
2022-03-21 23:12:19 +00:00
-signing {
- required { isReleaseBuild() && gradle.taskGraph.hasTask(":client:publish") }
- sign publishing.publications.mavenJava
2021-11-19 01:55:16 +00:00
-}
diff --git a/java/settings.gradle b/java/settings.gradle
2022-06-16 19:49:12 +00:00
index f6414646..34cf9276 100644
--- a/java/settings.gradle
+++ b/java/settings.gradle
2022-04-06 18:23:15 +00:00
@@ -6,13 +6,4 @@ pluginManagement {
2022-03-21 23:12:19 +00:00
}
}
2022-04-06 18:23:15 +00:00
-include ':client', ':server'
-
-if (JavaVersion.current().isJava11Compatible()) {
- include ':android'
-} else if (gradle.startParameter.getTaskNames().any { name -> name.contains('android:') }) {
- throw new GradleException("building for Android requires JDK 11 or newer")
-} else if (gradle.startParameter.getTaskNames().any { name -> name.lastIndexOf(':') <= 0 }) {
- // If there are any top-level tasks ("build" or ":build" but not ":client:build")...
- throw new GradleException("building for Android requires JDK 11 or newer; use 'client:' or 'server:' to only build certain products")
-}
2022-03-21 23:12:19 +00:00
+include ':client'
2021-10-15 07:26:35 +00:00
--
2022-02-12 06:51:17 +00:00
2.30.2
2021-10-15 07:26:35 +00:00