295 lines
15 KiB
Diff
295 lines
15 KiB
Diff
From c8219a8be171ca170eb9ef8d85100c7ab8a6b9a7 Mon Sep 17 00:00:00 2001
|
|
From: signald <nobody@signald.org>
|
|
Date: Sat, 16 Dec 2023 16:42:49 -0800
|
|
Subject: [PATCH] update build files and provide a way for the websocket
|
|
receive callback to indicate the message was not saved
|
|
|
|
---
|
|
build.gradle.kts | 16 ++----
|
|
dependencies.gradle.kts | 2 +-
|
|
gradle/verification-metadata.xml | 88 +++++++++++++++++++++++++++++---
|
|
service/build.gradle.kts | 20 ++++++--
|
|
settings.gradle.kts | 3 ++
|
|
5 files changed, 105 insertions(+), 24 deletions(-)
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
index 89519ef1..8d9d01d9 100644
|
|
--- a/build.gradle.kts
|
|
+++ b/build.gradle.kts
|
|
@@ -6,6 +6,9 @@ buildscript {
|
|
rootProject.extra["kotlin_version"] = "1.9.10"
|
|
|
|
repositories {
|
|
+ maven {
|
|
+ url = uri("https://gitlab.com/api/v4/groups/6853927/-/packages/maven") // https://gitlab.com/groups/signald/-/packages
|
|
+ }
|
|
google()
|
|
mavenCentral()
|
|
maven {
|
|
@@ -31,23 +34,12 @@ buildscript {
|
|
|
|
apply(from = "${rootDir}/constants.gradle.kts")
|
|
|
|
-plugins {
|
|
- id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
|
|
-}
|
|
|
|
-project.group = "com.github.turasa"
|
|
+project.group = "org.signald"
|
|
|
|
val repositoryUsername = project.findProperty("whisperSonatypeUsername")?.toString() ?: ""
|
|
val repositoryPassword = project.findProperty("whisperSonatypePassword")?.toString() ?: ""
|
|
|
|
-nexusPublishing {
|
|
- repositories {
|
|
- sonatype {
|
|
- username = repositoryUsername
|
|
- password = repositoryPassword
|
|
- }
|
|
- }
|
|
-}
|
|
|
|
val lib_signal_service_version_number: String by rootProject.extra
|
|
val lib_signal_service_group_info: String by rootProject.extra
|
|
diff --git a/dependencies.gradle.kts b/dependencies.gradle.kts
|
|
index 152a0298..e0bd16af 100644
|
|
--- a/dependencies.gradle.kts
|
|
+++ b/dependencies.gradle.kts
|
|
@@ -13,7 +13,7 @@ dependencyResolutionManagement {
|
|
library("google-jsr305", "com.google.code.findbugs:jsr305:3.0.2")
|
|
|
|
// 1st Party
|
|
- library("libsignal-client", "org.signal", "libsignal-client").versionRef("libsignal-client")
|
|
+ library("libsignal-client", "org.signald", "libsignal-client-" + System.getenv("TARGET")).versionRef("libsignal-client")
|
|
|
|
// Third Party
|
|
library("jackson-core", "com.fasterxml.jackson.core:jackson-databind:2.16.0")
|
|
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
|
|
index 7b9f9ca9..87bc8856 100644
|
|
--- a/gradle/verification-metadata.xml
|
|
+++ b/gradle/verification-metadata.xml
|
|
@@ -1,5 +1,5 @@
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
-<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.2.xsd">
|
|
+<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.1.xsd">
|
|
<configuration>
|
|
<verify-metadata>true</verify-metadata>
|
|
<verify-signatures>false</verify-signatures>
|
|
@@ -60,6 +60,11 @@
|
|
<sha256 value="fd491f78857424106d2e3d605bcd799b53d31a565cdc868463ca7e875db45a50" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
</component>
|
|
+ <component group="com.fasterxml.jackson" name="jackson-base" version="2.16.0">
|
|
+ <artifact name="jackson-base-2.16.0.pom">
|
|
+ <sha256 value="f9b7476ec3798a125f14c9da546fa7af861ead93a1999b2c0d363b9592c2336e" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ </component>
|
|
<component group="com.fasterxml.jackson" name="jackson-bom" version="2.16.0">
|
|
<artifact name="jackson-bom-2.16.0.pom">
|
|
<sha256 value="5aaa28874405bf04fba8e2c57159227824461ba6f7d552abdb8e8d3a0ba6f8bf" origin="Generated by Gradle"/>
|
|
@@ -451,6 +456,9 @@
|
|
<artifact name="okio-bom-3.0.0.module">
|
|
<sha256 value="fb5d398df7754d9a95279ff09f1292ebf8dc145008f046a2710c07637aff0e69" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
+ <artifact name="okio-bom-3.0.0.pom">
|
|
+ <sha256 value="0ecbfab3a19d76d7e0553a02ff83d0630b8503f152deebdddeae60891d5d7554" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
</component>
|
|
<component group="com.squareup.okio" name="okio-jvm" version="3.0.0">
|
|
<artifact name="okio-jvm-3.0.0.jar">
|
|
@@ -800,6 +808,12 @@
|
|
</artifact>
|
|
</component>
|
|
<component group="org.jetbrains.kotlin" name="kotlin-gradle-plugin" version="1.9.10">
|
|
+ <artifact name="kotlin-gradle-plugin-1.9.10-gradle74.jar">
|
|
+ <sha256 value="4a41c6b6c4218edf430283c949ee42b11d12aba7d4456b73f006625781491158" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ <artifact name="kotlin-gradle-plugin-1.9.10-gradle76.jar">
|
|
+ <sha256 value="43850ac693c77dd17a2c3e26f53be5d6a4e2220981354168d722f73b5275fd35" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
<artifact name="kotlin-gradle-plugin-1.9.10-gradle81.jar">
|
|
<sha256 value="02e89edf5c0c5c76458945f7cd2c692151f004392466782e8f7c0f83954b031d" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
@@ -816,6 +830,12 @@
|
|
</artifact>
|
|
</component>
|
|
<component group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-api" version="1.9.10">
|
|
+ <artifact name="kotlin-gradle-plugin-api-1.9.10-gradle74.jar">
|
|
+ <sha256 value="0fd8e6a4b9bcefa85086b4a3ad9a9c1429b575367514b8a7ff03db84b1c26070" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ <artifact name="kotlin-gradle-plugin-api-1.9.10-gradle76.jar">
|
|
+ <sha256 value="0fd8e6a4b9bcefa85086b4a3ad9a9c1429b575367514b8a7ff03db84b1c26070" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
<artifact name="kotlin-gradle-plugin-api-1.9.10-gradle81.jar">
|
|
<sha256 value="0fd8e6a4b9bcefa85086b4a3ad9a9c1429b575367514b8a7ff03db84b1c26070" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
@@ -890,6 +910,14 @@
|
|
<sha256 value="3ee7fc8c9ab433864297e32d91235738e77f339d8a75c2f09494d9a078d315d3" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
</component>
|
|
+ <component group="org.jetbrains.kotlin" name="kotlin-reflect" version="1.5.31">
|
|
+ <artifact name="kotlin-reflect-1.5.31.jar">
|
|
+ <sha256 value="6e0f5490e6b9649ddd2670534e4d3a03bd283c3358b8eef5d1304fd5f8a5a4fb" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ <artifact name="kotlin-reflect-1.5.31.pom">
|
|
+ <sha256 value="562b4baaeeac7c725894a105fc51cd3d67e0a259e71140d555426c33270b3014" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ </component>
|
|
<component group="org.jetbrains.kotlin" name="kotlin-reflect" version="1.6.10">
|
|
<artifact name="kotlin-reflect-1.6.10.jar">
|
|
<sha256 value="3277ac102ae17aad10a55abec75ff5696c8d109790396434b496e75087854203" origin="Generated by Gradle"/>
|
|
@@ -978,6 +1006,14 @@
|
|
<sha256 value="f9953943f771d21c491b83a8fd8f5cd181b860677eb4da503ff936ee265ba5bc" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
</component>
|
|
+ <component group="org.jetbrains.kotlin" name="kotlin-stdlib" version="1.5.31">
|
|
+ <artifact name="kotlin-stdlib-1.5.31.jar">
|
|
+ <sha256 value="4800ceacb2ec0bb9959a087154b8e35318ead1ea4eba32d4bb1b9734222a7e68" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ <artifact name="kotlin-stdlib-1.5.31.pom">
|
|
+ <sha256 value="8f76760104ac4e873009c9f033dd1bad75b9d3b8f9521d63db1264d844852e6c" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ </component>
|
|
<component group="org.jetbrains.kotlin" name="kotlin-stdlib" version="1.6.20">
|
|
<artifact name="kotlin-stdlib-1.6.20.pom">
|
|
<sha256 value="a08e83dcb0f298509877de22d526446476ddb31ea1c77530f2c81f24db166f99" origin="Generated by Gradle"/>
|
|
@@ -1012,6 +1048,14 @@
|
|
<sha256 value="7e29fbf73fdf71e0679d3dee7e680fd573464fa01644a4f58ab819d2c088d3d2" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
</component>
|
|
+ <component group="org.jetbrains.kotlin" name="kotlin-stdlib-common" version="1.5.31">
|
|
+ <artifact name="kotlin-stdlib-common-1.5.31.jar">
|
|
+ <sha256 value="dfa2a18e26b028388ee1968d199bf6f166f737ab7049c25a5e2da614404e22ad" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ <artifact name="kotlin-stdlib-common-1.5.31.pom">
|
|
+ <sha256 value="b615e946b8c3d2bea99652ecda97d57ecf83bf5f34c65d286790af23e51283c2" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ </component>
|
|
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-common" version="1.6.0">
|
|
<artifact name="kotlin-stdlib-common-1.6.0.pom">
|
|
<sha256 value="899e97c2028b5f7a2bdaf6751fa2a01b687e3ee2a781767c8a227cbffb6c0184" origin="Generated by Gradle"/>
|
|
@@ -1046,6 +1090,14 @@
|
|
<sha256 value="7d4b70547910676b3bdfc8925a88f3b6bfb24582c9784542805544ceef490a92" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
</component>
|
|
+ <component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk7" version="1.5.31">
|
|
+ <artifact name="kotlin-stdlib-jdk7-1.5.31.jar">
|
|
+ <sha256 value="a25bf47353ce899d843cbddee516d621a73473e7fba97f8d0301e7b4aed7c15f" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ <artifact name="kotlin-stdlib-jdk7-1.5.31.pom">
|
|
+ <sha256 value="23138489ee293a68197068877745f700bfa11af989187bed3c3074cd8c079778" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ </component>
|
|
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk7" version="1.7.10">
|
|
<artifact name="kotlin-stdlib-jdk7-1.7.10.jar">
|
|
<sha256 value="54f61351b1936ad88f4e53059fe781e723eae51d78ed9e7422d8b403574ec682" origin="Generated by Gradle"/>
|
|
@@ -1070,6 +1122,14 @@
|
|
<sha256 value="c7fa67c7961320b89d85a3ca59a2e18c2c65850845595dcae4b46af6945edcd5" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
</component>
|
|
+ <component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk8" version="1.5.31">
|
|
+ <artifact name="kotlin-stdlib-jdk8-1.5.31.jar">
|
|
+ <sha256 value="b548f7767aacf029d2417e47440742bd6d3ebede19b60386e23554ce5c4c5fdc" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ <artifact name="kotlin-stdlib-jdk8-1.5.31.pom">
|
|
+ <sha256 value="45110aab0074792b815807b02b2daf18d2b37e8747ac0692aad7a0d02da893df" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ </component>
|
|
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk8" version="1.6.20">
|
|
<artifact name="kotlin-stdlib-jdk8-1.6.20.pom">
|
|
<sha256 value="1846a9f8604b0be1c71a2128bdbd9d8902720279427f622d2b9a440ac9a3c309" origin="Generated by Gradle"/>
|
|
@@ -1209,6 +1269,22 @@
|
|
<sha256 value="9bc51a8955a1e081fa1f493a2c98f1f9dc2263d135454d5c107da36d890bce7a" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
</component>
|
|
+ <component group="org.junit" name="junit-bom" version="5.9.2">
|
|
+ <artifact name="junit-bom-5.9.2.module">
|
|
+ <sha256 value="ab137ba5a8e32c9b066bf9126a1c76dd5614b724ba5c0b02549772b5e9f4cf1f" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ <artifact name="junit-bom-5.9.2.pom">
|
|
+ <sha256 value="2ed07d65845131f5336a86476c9a4056b59d0b58b9815ab3679bb0f36f35f705" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ </component>
|
|
+ <component group="org.junit" name="junit-bom" version="5.9.3">
|
|
+ <artifact name="junit-bom-5.9.3.module">
|
|
+ <sha256 value="b401fd25901e582a524aa5343c4b39e28bc56e24961c1069bf2b4bbfcee46b93" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ <artifact name="junit-bom-5.9.3.pom">
|
|
+ <sha256 value="4d0329cd9e72f2420e5ca15724cbfe6ffa6e5fd2888361516271190fdc342ed7" origin="Generated by Gradle"/>
|
|
+ </artifact>
|
|
+ </component>
|
|
<component group="org.mockito" name="mockito-core" version="2.23.4">
|
|
<artifact name="mockito-core-2.23.4.jar">
|
|
<sha256 value="d77e018b6bc211d78ddcec54bc508732c4677b9a9eb9103793be85441b20bc5d" origin="Generated by Gradle"/>
|
|
@@ -1238,12 +1314,12 @@
|
|
<sha256 value="cced467175f4257833f6cb07510ff97b3c75a06e1a58d882a39d79853d51c602" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
</component>
|
|
- <component group="org.signal" name="libsignal-client" version="0.36.1">
|
|
- <artifact name="libsignal-client-0.36.1.jar">
|
|
- <sha256 value="06d1ab0974416961ee5fcfd2709b3bfb90f26f2d4d846ae8a0332e12ff0e34f6" origin="Generated by Gradle"/>
|
|
+ <component group="org.signald" name="libsignal-client-{TARGET}" version="0.36.1">
|
|
+ <artifact name="libsignal-client-{TARGET}-0.36.1.jar">
|
|
+ <sha256 value="{TARGET_JAR_SHA256}" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
- <artifact name="libsignal-client-0.36.1.module">
|
|
- <sha256 value="1eab8a6b6c3482fa0ec8e32acca4499cb33aa87e7a23eb02cbc316be35a64204" origin="Generated by Gradle"/>
|
|
+ <artifact name="libsignal-client-{TARGET}-0.36.1.module">
|
|
+ <sha256 value="{TARGET_MODULE_SHA256}" origin="Generated by Gradle"/>
|
|
</artifact>
|
|
</component>
|
|
<component group="org.slf4j" name="slf4j-api" version="2.0.0">
|
|
diff --git a/service/build.gradle.kts b/service/build.gradle.kts
|
|
index bc927658..463d9214 100644
|
|
--- a/service/build.gradle.kts
|
|
+++ b/service/build.gradle.kts
|
|
@@ -114,7 +114,7 @@ publishing {
|
|
from(components["java"])
|
|
|
|
pom {
|
|
- name.set("signal-service-java")
|
|
+ name.set("signal-service-java-" + System.getenv("TARGET"))
|
|
description.set("Signal Service communication library for Java, unofficial fork")
|
|
url.set("https://github.com/Turasa/libsignal-service-java")
|
|
licenses {
|
|
@@ -141,10 +141,20 @@ publishing {
|
|
}
|
|
}
|
|
}
|
|
+
|
|
+ repositories {
|
|
+ maven {
|
|
+ url = uri(System.getenv("CI_API_V4_URL") + "/projects/" + System.getenv("CI_PROJECT_ID") + "/packages/maven")
|
|
+ name = "GitLab"
|
|
+ credentials(HttpHeaderCredentials::class) {
|
|
+ name = "Job-Token"
|
|
+ value = System.getenv("CI_JOB_TOKEN")
|
|
+ }
|
|
+ authentication {
|
|
+ create("header", HttpHeaderAuthentication::class)
|
|
+ }
|
|
+ }
|
|
+ }
|
|
}
|
|
}
|
|
|
|
-signing {
|
|
- isRequired = gradle.taskGraph.hasTask("uploadArchives")
|
|
- sign(publishing.publications["mavenJava"])
|
|
-}
|
|
diff --git a/settings.gradle.kts b/settings.gradle.kts
|
|
index b0de0df4..6332e1db 100644
|
|
--- a/settings.gradle.kts
|
|
+++ b/settings.gradle.kts
|
|
@@ -1,5 +1,8 @@
|
|
dependencyResolutionManagement {
|
|
repositories {
|
|
+ maven {
|
|
+ url = uri("https://gitlab.com/api/v4/groups/6853927/-/packages/maven") // https://gitlab.com/groups/signald/-/packages
|
|
+ }
|
|
mavenCentral()
|
|
mavenLocal()
|
|
}
|
|
--
|
|
2.39.2
|
|
|