mirror of
https://gitlab.com/signald/libraries/libsignal-client.git
synced 2024-12-04 19:46:37 +00:00
130 lines
3.6 KiB
Diff
130 lines
3.6 KiB
Diff
From 907e83868ee82ff5b24ab1d68b8159a44a6908e7 Mon Sep 17 00:00:00 2001
|
|
From: signald <nobody@signald.org>
|
|
Date: Sat, 16 Dec 2023 11:24:01 -0800
|
|
Subject: [PATCH] update build files
|
|
|
|
---
|
|
java/build.gradle | 19 +------------------
|
|
java/client/build.gradle | 25 +++++++++++++------------
|
|
java/settings.gradle | 13 +------------
|
|
3 files changed, 15 insertions(+), 42 deletions(-)
|
|
|
|
diff --git a/java/build.gradle b/java/build.gradle
|
|
index ef4cbe6b..81c50aca 100644
|
|
--- a/java/build.gradle
|
|
+++ b/java/build.gradle
|
|
@@ -1,13 +1,12 @@
|
|
plugins {
|
|
id "base"
|
|
- id "signing"
|
|
id "com.diffplug.spotless" version "6.20.0"
|
|
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
|
|
}
|
|
|
|
allprojects {
|
|
version = "0.36.1"
|
|
- group = "org.signal"
|
|
+ group = "org.signald"
|
|
}
|
|
|
|
subprojects {
|
|
@@ -42,13 +41,6 @@ subprojects {
|
|
}
|
|
}
|
|
|
|
-task makeJniLibrariesDesktop(type:Exec) {
|
|
- group 'Rust'
|
|
- description 'Build the JNI libraries'
|
|
-
|
|
- // Explicitly specify 'bash' for Windows compatibility.
|
|
- commandLine 'bash', './build_jni.sh', 'desktop'
|
|
-}
|
|
|
|
task cargoClean(type:Exec) {
|
|
group 'Rust'
|
|
@@ -80,15 +72,6 @@ ext.setUpSigningKey = { signingExt ->
|
|
}
|
|
}
|
|
|
|
-nexusPublishing {
|
|
- repositories {
|
|
- sonatype {
|
|
- username = project.findProperty('sonatypeUsername') ?: ""
|
|
- password = project.findProperty('sonatypePassword') ?: ""
|
|
- }
|
|
- }
|
|
-}
|
|
-
|
|
def isReleaseBuild() {
|
|
return version.contains("SNAPSHOT") == false
|
|
}
|
|
diff --git a/java/client/build.gradle b/java/client/build.gradle
|
|
index c5f61516..b88da2c4 100644
|
|
--- a/java/client/build.gradle
|
|
+++ b/java/client/build.gradle
|
|
@@ -56,17 +56,12 @@ tasks.named('jar') {
|
|
}
|
|
}
|
|
|
|
-processResources {
|
|
- // TODO: Build a different variant of the JNI library for server.
|
|
- dependsOn ':makeJniLibrariesDesktop'
|
|
-}
|
|
-
|
|
// MARK: Publishing
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
- artifactId = archivesBaseName
|
|
+ artifactId = archivesBaseName + "-" + System.getenv("TARGET")
|
|
from components.java
|
|
|
|
pom {
|
|
@@ -95,10 +90,16 @@ publishing {
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
-
|
|
-setUpSigningKey(signing)
|
|
-signing {
|
|
- required { isReleaseBuild() && gradle.taskGraph.hasTask(":client:publish") }
|
|
- sign publishing.publications.mavenJava
|
|
+ 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 6d717998..e58126f6 100644
|
|
--- a/java/settings.gradle
|
|
+++ b/java/settings.gradle
|
|
@@ -8,15 +8,4 @@ pluginManagement {
|
|
|
|
rootProject.name = 'libsignal'
|
|
|
|
-include ':client', ':server', ':shared'
|
|
-
|
|
-if (hasProperty('skipAndroid')) {
|
|
- // Do nothing
|
|
-} else if (JavaVersion.current().isJava11Compatible()) {
|
|
- include ':android', ':android:benchmarks'
|
|
-} 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")
|
|
-}
|
|
+include ':client'
|
|
--
|
|
2.39.2
|
|
|