mirror of
https://gitlab.com/signald/libraries/libsignal-client.git
synced 2024-12-04 19:46:37 +00:00
update to libsignal v0.10.0
This commit is contained in:
parent
f0d22a0253
commit
679b03ce30
2 changed files with 89 additions and 122 deletions
|
@ -3,7 +3,7 @@ stages:
|
|||
- bindings
|
||||
|
||||
variables:
|
||||
libsignal_version: "v0.9.4"
|
||||
libsignal_version: "v0.10.0"
|
||||
GRADLE_OPTS: -Dorg.gradle.daemon=false
|
||||
|
||||
.multitarget:
|
||||
|
|
209
libsignal.patch
209
libsignal.patch
|
@ -1,110 +1,73 @@
|
|||
From aa16cda2790302d52286048afc3838b7b524df2e Mon Sep 17 00:00:00 2001
|
||||
From 2292224693579052a28010ac160acec9f20fadfa Mon Sep 17 00:00:00 2001
|
||||
From: signald <nobody@signald.org>
|
||||
Date: Sun, 24 Oct 2021 12:45:54 -0700
|
||||
Date: Thu, 18 Nov 2021 17:54:25 -0800
|
||||
Subject: [PATCH] update gradle files
|
||||
|
||||
---
|
||||
java/build.gradle | 35 +--------------
|
||||
java/java/build.gradle | 98 +++++++++--------------------------------
|
||||
java/settings.gradle | 2 +-
|
||||
java/tests/build.gradle | 6 ---
|
||||
4 files changed, 23 insertions(+), 118 deletions(-)
|
||||
java/build.gradle | 6 ---
|
||||
java/java/build.gradle | 98 +++++++-----------------------------------
|
||||
java/settings.gradle | 2 +-
|
||||
3 files changed, 16 insertions(+), 90 deletions(-)
|
||||
|
||||
diff --git a/java/build.gradle b/java/build.gradle
|
||||
index 8c8eefb..f4e739f 100644
|
||||
index ae78254..07584d1 100644
|
||||
--- a/java/build.gradle
|
||||
+++ b/java/build.gradle
|
||||
@@ -9,37 +9,4 @@ subprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
-}
|
||||
-
|
||||
-task makeJniLibrariesAndroid(type:Exec) {
|
||||
- group 'Rust'
|
||||
- description 'Build the JNI libraries'
|
||||
-
|
||||
- commandLine './build_jni.sh', 'android'
|
||||
-}
|
||||
-
|
||||
-task makeJniLibrariesDesktop(type:Exec) {
|
||||
- group 'Rust'
|
||||
- description 'Build the JNI libraries'
|
||||
-
|
||||
- commandLine './build_jni.sh', 'desktop'
|
||||
-}
|
||||
-
|
||||
-task clean(type: Delete) {
|
||||
- description 'Clean JNI libs'
|
||||
- delete fileTree('./android/src/main/jniLibs') {
|
||||
- include '**/*.so'
|
||||
- }
|
||||
- delete fileTree('./java/src/main/resources') {
|
||||
- include '**/*.so'
|
||||
- include '**/*.dylib'
|
||||
- include '**/*.dll'
|
||||
- }
|
||||
-}
|
||||
-
|
||||
@@ -43,9 +43,3 @@ task clean(type: Delete) {
|
||||
}
|
||||
clean.dependsOn(cargoClean)
|
||||
|
||||
-task makeAll() {
|
||||
- group 'Rust'
|
||||
- description 'Build the native libraries'
|
||||
-
|
||||
- dependsOn 'makeJniLibrariesDesktop', 'makeJniLibrariesAndroid'
|
||||
-}
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/java/java/build.gradle b/java/java/build.gradle
|
||||
index 2f31542..6e8f369 100644
|
||||
index 55b1ee2..8ae83c0 100644
|
||||
--- a/java/java/build.gradle
|
||||
+++ b/java/java/build.gradle
|
||||
@@ -6,8 +6,8 @@ buildscript {
|
||||
@@ -7,11 +7,10 @@ buildscript {
|
||||
|
||||
plugins {
|
||||
id "de.undercouch.download" version "4.1.1"
|
||||
+ id 'maven-publish'
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
-apply plugin: 'maven'
|
||||
apply plugin: 'signing'
|
||||
+apply plugin: 'maven-publish'
|
||||
-apply plugin: 'signing'
|
||||
|
||||
sourceCompatibility = 1.7
|
||||
archivesBaseName = "signal-client-java"
|
||||
@@ -19,32 +19,6 @@ repositories {
|
||||
mavenLocal()
|
||||
@@ -24,18 +23,9 @@ repositories {
|
||||
}
|
||||
|
||||
-sourceSets {
|
||||
sourceSets {
|
||||
- test {
|
||||
- java {
|
||||
- srcDirs = ['src/test/java/', project(':tests').file('src/test/java')]
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-dependencies {
|
||||
- testCompile ('junit:junit:3.8.2')
|
||||
-}
|
||||
-
|
||||
-test {
|
||||
- testLogging {
|
||||
- events 'passed'
|
||||
- showStandardStreams = true
|
||||
- showExceptions true
|
||||
- exceptionFormat 'full'
|
||||
- showCauses true
|
||||
- showStackTraces true
|
||||
- }
|
||||
-
|
||||
- include 'org/whispersystems/**'
|
||||
- include 'org/signal/**'
|
||||
-}
|
||||
-
|
||||
def isReleaseBuild() {
|
||||
return version.contains("SNAPSHOT") == false
|
||||
}
|
||||
@@ -67,54 +41,6 @@ signing {
|
||||
sign configurations.archives
|
||||
otherPlatformLibraries {}
|
||||
}
|
||||
|
||||
-dependencies {
|
||||
- testCompile ('junit:junit:4.12')
|
||||
-}
|
||||
-
|
||||
test {
|
||||
testLogging {
|
||||
events 'passed'
|
||||
@@ -67,55 +57,23 @@ def getRepositoryPassword() {
|
||||
return hasProperty('whisperSonatypePassword') ? whisperSonatypePassword : ""
|
||||
}
|
||||
|
||||
-signing {
|
||||
- required { isReleaseBuild() && gradle.taskGraph.hasTask(":java:uploadArchives") }
|
||||
- sign configurations.archives
|
||||
-}
|
||||
-
|
||||
-uploadArchives {
|
||||
- configuration = configurations.archives
|
||||
- repositories.mavenDeployer {
|
||||
|
@ -139,38 +102,21 @@ index 2f31542..6e8f369 100644
|
|||
- name 'Signal Messenger LLC'
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-task installArchives(type: Upload) {
|
||||
- description "Installs the artifacts to the local Maven repository."
|
||||
- configuration = configurations['archives']
|
||||
- repositories {
|
||||
- mavenDeployer {
|
||||
- repository url: "file://${System.properties['user.home']}/.m2/repository"
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
task packageJavadoc(type: Jar, dependsOn: 'javadoc') {
|
||||
from javadoc.destinationDir
|
||||
classifier = 'javadoc'
|
||||
@@ -133,6 +59,24 @@ artifacts {
|
||||
archives packageSources
|
||||
}
|
||||
|
||||
-tasks.withType(JavaCompile) {
|
||||
- compileTask -> compileTask.dependsOn ':makeJniLibrariesDesktop'
|
||||
+
|
||||
+publishing {
|
||||
+ publications {
|
||||
+ library(MavenPublication) {
|
||||
+ from components.java
|
||||
+ artifactId = archivesBaseName + "-" + System.getenv("TARGET")
|
||||
+ }
|
||||
+ }
|
||||
+ repositories {
|
||||
}
|
||||
}
|
||||
-}
|
||||
-
|
||||
-task installArchives(type: Upload) {
|
||||
- description "Installs the artifacts to the local Maven repository."
|
||||
- configuration = configurations['archives']
|
||||
repositories {
|
||||
- mavenDeployer {
|
||||
- repository url: "file://${System.properties['user.home']}/.m2/repository"
|
||||
+ maven {
|
||||
+ url System.getenv("CI_API_V4_URL") + "/projects/" + System.getenv("CI_PROJECT_ID") + "/packages/maven"
|
||||
+ credentials(HttpHeaderCredentials) {
|
||||
|
@ -180,32 +126,53 @@ index 2f31542..6e8f369 100644
|
|||
+ authentication {
|
||||
+ header(HttpHeaderAuthentication)
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,36 +88,10 @@ task packageSources(type: Jar) {
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
-task testableJar(type: Jar) {
|
||||
- from sourceSets.main.output
|
||||
- from sourceSets.otherPlatformLibraries.resources
|
||||
- classifier = 'testable'
|
||||
-
|
||||
- onlyIf { gradle.taskGraph.hasTask(':java:uploadArchives') }
|
||||
-
|
||||
- def extraResources = ['signal_jni.dll', 'libsignal_jni.dylib']
|
||||
- def extraResourcesDir = 'src/otherPlatformLibraries/resources'
|
||||
-
|
||||
- doFirst {
|
||||
- mkdir extraResourcesDir
|
||||
- extraResources.each { name ->
|
||||
- download {
|
||||
- src 'https://github.com/signalapp/libsignal-client/releases/download/v' + project.version + '/' + name
|
||||
- dest extraResourcesDir + '/' + name
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
artifacts {
|
||||
archives(packageJavadoc) {
|
||||
type = 'javadoc'
|
||||
}
|
||||
|
||||
archives packageSources
|
||||
- archives testableJar
|
||||
-}
|
||||
-
|
||||
-tasks.withType(JavaCompile) {
|
||||
- compileTask -> compileTask.dependsOn ':makeJniLibrariesDesktop'
|
||||
}
|
||||
diff --git a/java/settings.gradle b/java/settings.gradle
|
||||
index 7412250..4a565e5 100644
|
||||
index 7412250..4c0f3cd 100644
|
||||
--- a/java/settings.gradle
|
||||
+++ b/java/settings.gradle
|
||||
@@ -1 +1 @@
|
||||
-include ':java', ':android', ':tests'
|
||||
+include ':java', ':tests'
|
||||
diff --git a/java/tests/build.gradle b/java/tests/build.gradle
|
||||
index 013779e..aef19f2 100644
|
||||
--- a/java/tests/build.gradle
|
||||
+++ b/java/tests/build.gradle
|
||||
@@ -3,10 +3,4 @@ apply plugin: 'java'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
-}
|
||||
-
|
||||
-dependencies {
|
||||
- testCompile 'junit:junit:3.8.2'
|
||||
-
|
||||
- compile project(':java')
|
||||
}
|
||||
\ No newline at end of file
|
||||
+include ':java'
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
Loading…
Reference in a new issue