2022-10-27 03:04:31 +00:00
|
|
|
From df2a3fc267457a6f17527ed49e149ccc89895b25 Mon Sep 17 00:00:00 2001
|
2021-10-15 07:26:35 +00:00
|
|
|
From: signald <nobody@signald.org>
|
2022-10-27 03:04:31 +00:00
|
|
|
Date: Wed, 26 Oct 2022 20:02:19 -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-10-27 03:04:31 +00:00
|
|
|
java/client/build.gradle | 28 ++++++++--------------------
|
2022-04-06 18:23:15 +00:00
|
|
|
java/settings.gradle | 11 +----------
|
2022-10-27 03:04:31 +00:00
|
|
|
3 files changed, 10 insertions(+), 38 deletions(-)
|
2021-10-15 07:26:35 +00:00
|
|
|
|
|
|
|
diff --git a/java/build.gradle b/java/build.gradle
|
2022-10-27 03:04:31 +00:00
|
|
|
index 0c8f9458..01d198e7 100644
|
2021-10-15 07:26:35 +00:00
|
|
|
--- a/java/build.gradle
|
|
|
|
+++ b/java/build.gradle
|
2022-10-27 03:04:31 +00:00
|
|
|
@@ -6,7 +6,7 @@ def version_number = "0.20.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 {
|
2022-03-21 23:12:19 +00:00
|
|
|
diff --git a/java/client/build.gradle b/java/client/build.gradle
|
2022-10-27 03:04:31 +00:00
|
|
|
index 7ee6b154..8fa89874 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'
|
2021-10-24 20:02:35 +00:00
|
|
|
}
|
|
|
|
|
2022-03-21 23:12:19 +00:00
|
|
|
sourceCompatibility = 1.8
|
2022-10-27 03:04:31 +00:00
|
|
|
@@ -46,23 +45,13 @@ java {
|
2022-03-21 23:12:19 +00:00
|
|
|
withJavadocJar()
|
2021-10-15 07:26:35 +00:00
|
|
|
}
|
2021-10-24 20:02: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
|
|
|
|
- }
|
2021-10-24 20:02:35 +00:00
|
|
|
- }
|
|
|
|
-}
|
2022-09-13 22:10:24 +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-10-27 03:04:31 +00:00
|
|
|
@@ -93,16 +82,15 @@ 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-09-13 22:10:24 +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
|
|
|
-}
|
2021-10-24 20:02:35 +00:00
|
|
|
diff --git a/java/settings.gradle b/java/settings.gradle
|
2022-10-27 03:04:31 +00:00
|
|
|
index f6414646..13575990 100644
|
2021-10-24 20:02:35 +00:00
|
|
|
--- a/java/settings.gradle
|
|
|
|
+++ b/java/settings.gradle
|
2023-07-16 08:53:07 +00:00
|
|
|
@@ -6,15 +6,4 @@ pluginManagement {
|
2022-03-21 23:12:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-06 18:23:15 +00:00
|
|
|
-include ':client', ':server'
|
|
|
|
-
|
2023-07-16 08:53:07 +00:00
|
|
|
-if (hasProperty('skipAndroid')) {
|
|
|
|
- // Do nothing
|
|
|
|
-} else if (JavaVersion.current().isJava11Compatible()) {
|
|
|
|
- include ':android', ':android:benchmarks'
|
2022-04-06 18:23:15 +00:00
|
|
|
-} 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'
|
2022-10-27 03:04:31 +00:00
|
|
|
\ No newline at end of file
|
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
|
|
|
|