libsignal-client/libsignal.patch

212 lines
5.4 KiB
Diff
Raw Normal View History

From aa16cda2790302d52286048afc3838b7b524df2e Mon Sep 17 00:00:00 2001
2021-10-15 07:26:35 +00:00
From: signald <nobody@signald.org>
2021-10-24 19:47:40 +00:00
Date: Sun, 24 Oct 2021 12:45:54 -0700
Subject: [PATCH] update gradle files
2021-10-15 07:26:35 +00:00
---
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(-)
2021-10-15 07:26:35 +00:00
diff --git a/java/build.gradle b/java/build.gradle
index 8c8eefb..f4e739f 100644
2021-10-15 07:26:35 +00:00
--- a/java/build.gradle
+++ b/java/build.gradle
@@ -9,37 +9,4 @@ subprojects {
}
}
2021-10-15 07:26:35 +00:00
}
-}
-
2021-10-15 07:26:35 +00:00
-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'
- }
-}
-
-task makeAll() {
- group 'Rust'
- description 'Build the native libraries'
-
2021-10-24 19:47:40 +00:00
- dependsOn 'makeJniLibrariesDesktop', 'makeJniLibrariesAndroid'
-}
+}
\ No newline at end of file
2021-10-15 07:26:35 +00:00
diff --git a/java/java/build.gradle b/java/java/build.gradle
index 2f31542..6e8f369 100644
2021-10-15 07:26:35 +00:00
--- a/java/java/build.gradle
+++ b/java/java/build.gradle
@@ -6,8 +6,8 @@ buildscript {
}
2021-10-15 07:26:35 +00:00
apply plugin: 'java'
-apply plugin: 'maven'
2021-10-15 07:26:35 +00:00
apply plugin: 'signing'
+apply plugin: 'maven-publish'
sourceCompatibility = 1.7
archivesBaseName = "signal-client-java"
@@ -19,32 +19,6 @@ repositories {
mavenLocal()
2021-10-15 07:26:35 +00:00
}
-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
}
-uploadArchives {
- configuration = configurations.archives
- repositories.mavenDeployer {
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
-
- repository(url: getReleaseRepositoryUrl()) {
- authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
- }
-
- pom.project {
- name 'signal-client-java'
- packaging 'jar'
- description 'Signal Protocol cryptography library for Java'
- url 'https://github.com/signalapp/libsignal-client'
-
- scm {
- url 'scm:git@github.com:signalapp/libsignal-client.git'
- connection 'scm:git@github.com:signalapp/libsignal-client.git'
- developerConnection 'scm:git@github.com:signalapp/libsignal-client.git'
- }
-
- licenses {
- license {
- name 'AGPLv3'
- url 'https://www.gnu.org/licenses/agpl-3.0.txt'
- distribution 'repo'
- }
- }
-
- developers {
- developer {
- 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'
2021-10-15 07:26:35 +00:00
+
+publishing {
+ publications {
+ library(MavenPublication) {
+ from components.java
+ artifactId = archivesBaseName + "-" + System.getenv("TARGET")
+ }
+ }
+ repositories {
+ maven {
+ 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)
+ }
+ }
+ }
}
diff --git a/java/settings.gradle b/java/settings.gradle
index 7412250..4a565e5 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
2021-10-15 07:26:35 +00:00
--
2.20.1