libsignal-client/libsignal.patch

124 lines
3.6 KiB
Diff
Raw Normal View History

From 89b9e3fd15bbb5241e3327446a2c63de7afddf32 Mon Sep 17 00:00:00 2001
2021-10-15 07:26:35 +00:00
From: signald <nobody@signald.org>
Date: Thu, 16 Jun 2022 12:48:11 -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 +--------
java/client/build.gradle | 30 ++++++++++--------------------
2022-04-06 18:23:15 +00:00
java/settings.gradle | 11 +----------
3 files changed, 12 insertions(+), 38 deletions(-)
2021-10-15 07:26:35 +00:00
diff --git a/java/build.gradle b/java/build.gradle
index 1f6dba0a..75f5ee09 100644
2021-10-15 07:26:35 +00:00
--- a/java/build.gradle
+++ b/java/build.gradle
@@ -6,7 +6,7 @@ def version_number = "0.17.0"
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 {
@@ -31,13 +31,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
index 7ee6b154..3b3d5fdf 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
@@ -46,23 +45,14 @@ 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-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 {
@@ -93,16 +83,16 @@ 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-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