update to v2.15.3_unofficial_90

This commit is contained in:
Finn 2023-12-16 16:43:30 -08:00
parent 7bfa3bc807
commit 5179cc9226
6 changed files with 281 additions and 209 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
libsignal-service-java

View file

@ -2,7 +2,7 @@ stages:
- build
variables:
version: "v2.15.3_unofficial_50"
version: "v2.15.3_unofficial_90"
GRADLE_OPTS: -Dorg.gradle.daemon=false
build:
@ -18,15 +18,15 @@ build:
- arm-unknown-linux-gnueabihf
- armv7-unknown-linux-gnueabihf
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
# - x86_64-unknown-linux-musl
build darwin:
stage: build
tags: [darwin-builder]
script:
- ./build.sh
parallel:
matrix:
- TARGET:
- x86_64-apple-darwin
- aarch64-apple-darwin
# build darwin:
# stage: build
# tags: [darwin-builder]
# script:
# - ./build.sh
# parallel:
# matrix:
# - TARGET:
# - x86_64-apple-darwin
# - aarch64-apple-darwin

View file

@ -5,7 +5,7 @@ cd libsignal-service-java
git config user.email nobody@signald.org
git config user.name signald
git am ../libsignal-service-java.patch
git am ../update-kbs-settings.patch
# git am ../update-kbs-settings.patch # unclear if this is still needed
python3 ../update-verification-metadata.py
git diff --color=always
gradle assemble publish || (gradle --write-verification-metadata sha256 && git diff --color=always && exit 1)

View file

@ -1,34 +1,22 @@
{
"aarch64-unknown-linux-gnu": {
"jar": "802529c1472f7e621cca496c918d7bfec08314572f10e168b0d20b15a5b8101a",
"module": "48e315037d2d9af6c7cf7b811d9a81d81b1eff13cbb1837b7638a3803b68f303"
"jar": "c0d1ce093ab2060e4333eb49c7315eaca50874cc9e7baa06b5e2ce58a141e6ac",
"module": "0657c6c9d287e5a41ceef433106ff5e490d469b2453fb7678bb0672aef0d75f6"
},
"arm-unknown-linux-gnueabi": {
"jar": "8ef66fe1ae28fe7b2918292824ef33a41a3432c3a981cfa55665106c89348327",
"module": "7c988dfb2fca57ff0aabd7bd88ebfa5658be8722adb0831a5140aed3d1529097"
"jar": "8c46441147601b9905dd91460830161a239355e4187ef6dcce4ab6d01e4601ba",
"module": "da17b4f0a37223f157d90d33907e746eceaa672e8ce1c0124a43d8ab4e4261d6"
},
"arm-unknown-linux-gnueabihf": {
"jar": "446a796b0a2a062c65d9d5cb75a3fd4aadc03ab321b52c39a5bfe1e6f9dc9891",
"module": "30e6a82cc6d2b01b57b758d8352c9d90926f31becfe6218c43d2614a309c9cbc"
"jar": "f72c16545d62a530985b17c554e626705e24ad8cbbb45807f16c3eca2e8bf5e6",
"module": "3c7ca3308427a89fba119d67a11cb31032042d407f7757a556c45d14bbf8af9b"
},
"armv7-unknown-linux-gnueabihf": {
"jar": "3e896a52cf5816387094137403c112353de93f4b7591bcfc5965e89ef3777c5b",
"module": "39be083718c6b8afe94e2ccff63c918ea1255292881afbb60b12236cd4b70dc6"
"jar": "e0ff56633ffa3868e640815b3d6f5bd7577586cc281aa4e5d9f1e818559d7446",
"module": "cb00288bdea54756ea3a712378ed5abc6e877be2940fef939c2c22e0a8c2b193"
},
"x86_64-unknown-linux-gnu": {
"jar": "b38295eb11df91939b872f49eb8b55b2faf7933da92202b95d82320f4cdcb644",
"module": "1b739335cde181864882481f5feca8fca3f7baa439f79c36ac596a781e6d4477"
},
"x86_64-apple-darwin": {
"jar": "949a72b14d81389a30e330db3162f822a475d0f19087590f334639acdb01b4eb",
"module": "7de5da969225585d36d68ba7a87c80d33886e36a04dea9d78ef8c2df9f6a3bf2"
},
"aarch64-apple-darwin": {
"jar": "e7f405b1c521054bbea8ec0ff87c54527f17e8c914079d7805c4def3589e8af1",
"module": "3c153a7e01ae317280981e387d3fd002b7106ce65653be1b6e4216a4f4d9d314"
},
"x86_64-unknown-linux-musl": {
"jar": "9a46edb376089b6284cbc76c4e6bc21fa91f8ee7e3daf221d704243cfe0c16cf",
"module": "a35abf78dc674557ddc7da348d5eb2d015b4e843d5402df95922ba2780b36169"
"jar": "dac1a217685d87a30bf4215e069799264893f749005f9c9c33ad6a009a69be69",
"module": "924b8868987fb56b250e3e5cf6157273b2cb8664996b6cdb85535fa84cf9fe15"
}
}

View file

@ -1,212 +1,295 @@
From c51057ae26118490176af0b2421f8fa62d926c00 Mon Sep 17 00:00:00 2001
From c8219a8be171ca170eb9ef8d85100c7ab8a6b9a7 Mon Sep 17 00:00:00 2001
From: signald <nobody@signald.org>
Date: Thu, 16 Jun 2022 13:04:00 -0700
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 | 17 +++--------------
dependencies.gradle | 3 +--
gradle/verification-metadata.xml | 13 ++++++++-----
service/build.gradle | 19 +++++++++----------
.../signalservice/api/NotSavedException.java | 4 ++++
.../signalservice/api/SignalWebSocket.java | 13 ++++++++++---
settings.gradle | 1 -
7 files changed, 35 insertions(+), 35 deletions(-)
create mode 100644 service/src/main/java/org/whispersystems/signalservice/api/NotSavedException.java
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 b/build.gradle
index 2498bfcb..81f7038d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -9,11 +9,8 @@ buildscript {
}
}
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.1.0"
- id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
-}
-project.group = "com.github.turasa"
+project.group = "org.signald"
def getRepositoryUsername() {
return hasProperty('whisperSonatypeUsername') ? whisperSonatypeUsername : ""
@@ -23,18 +20,10 @@ def getRepositoryPassword() {
return hasProperty('whisperSonatypePassword') ? whisperSonatypePassword : ""
}
val repositoryUsername = project.findProperty("whisperSonatypeUsername")?.toString() ?: ""
val repositoryPassword = project.findProperty("whisperSonatypePassword")?.toString() ?: ""
-nexusPublishing {
- repositories {
- sonatype {
- username = getRepositoryUsername()
- password = getRepositoryPassword()
- username = repositoryUsername
- password = repositoryPassword
- }
- }
-}
subprojects {
- ext.lib_signal_service_version_number = "2.15.3_unofficial_50"
- ext.lib_signal_service_group_info = "com.github.turasa"
+ ext.lib_signal_service_version_number = "2.15.3_unofficial_50_signald_2"
+ ext.lib_signal_service_group_info = "org.signald"
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
diff --git a/dependencies.gradle b/dependencies.gradle
index e4b9f8a8..20e0d2f2 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -8,8 +8,7 @@ dependencyResolutionManagement {
alias('google-libphonenumber').to('com.googlecode.libphonenumber:libphonenumber:8.12.48')
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
- alias('libsignal-client').to('org.signal', 'libsignal-client').versionRef('libsignal-client')
- alias('libsignal-android').to('org.signal', 'libsignal-android').versionRef('libsignal-client')
+ alias('libsignal-client').to('org.signald', 'libsignal-client-' + System.getenv("TARGET")).versionRef('libsignal-client')
- 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
alias('jackson-core').to('com.fasterxml.jackson.core:jackson-databind:2.13.0')
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 fc39d024..59fde59c 100644
index 7b9f9ca9..87bc8856 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -482,6 +482,9 @@
<artifact name="protoc-3.18.0-linux-x86_64.exe">
<sha256 value="e977a0b300a3b0c7c0135a02b8a4d746081e1cd8946ea747e0247412535692fe" origin="Generated by Gradle"/>
@@ -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>
+ <artifact name="protoc-3.18.0-osx-x86_64.exe">
+ <sha256 value="956241e25cac149cf8d01d4f9125f2913b3bc471deea6856231367cdf4be71a4" origin="Generated by Gradle"/>
</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.google.testing.platform" name="core-proto" version="0.0.8-alpha04">
<artifact name="core-proto-0.0.8-alpha04.jar">
@@ -1133,12 +1136,12 @@
<sha256 value="95510c70f1bf0fd65ddc1f39fbf7a42d75d8a064dc3a2cbe52496fa2f2c535f0" origin="Generated by Gradle"/>
<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.signal" name="libsignal-client" version="0.17.0">
- <artifact name="libsignal-client-0.17.0.jar">
- <sha256 value="3611dc9425d7ef85daedbafa49fa67f49e921bf89e36f601d0b79b1268315619" origin="Generated by Gradle"/>
+ <component group="org.signald" name="libsignal-client-{TARGET}" version="0.17.0">
+ <artifact name="libsignal-client-{TARGET}-0.17.0.jar">
<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.17.0.module">
- <sha256 value="cc6125c6e30421eb39a115576371a41f0adde7ea501e99d2c74192264e6fb1ab" origin="Generated by Gradle"/>
+ <artifact name="libsignal-client-{TARGET}-0.17.0.module">
- <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.tensorflow" name="tensorflow-lite-metadata" version="0.1.0-rc2">
diff --git a/service/build.gradle b/service/build.gradle
index ae4df43a..4b0240d8 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -21,6 +21,7 @@ compileJava {
}
repositories {
+ maven {url "https://gitlab.com/api/v4/groups/6853927/-/packages/maven"} // https://gitlab.com/groups/signald/-/packages
mavenCentral()
mavenLocal()
}
@@ -98,7 +99,7 @@ def getRepositoryPassword() {
publishing {
publications {
mavenJava(MavenPublication) {
- artifactId = 'signal-service-java'
+ artifactId = 'signal-service-java-' + System.getenv("TARGET")
from components.java
<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 {
@@ -139,16 +140,14 @@ publishing {
repositories {
maven {
- url = getReleaseRepositoryUrl()
- credentials {
- username getRepositoryUsername()
- password getRepositoryPassword()
+ url System.getenv("CI_API_V4_URL") + "/projects/" + System.getenv("CI_PROJECT_ID") + "/packages/maven"
+ credentials(HttpHeaderCredentials) {
+ name = 'Job-Token'
- 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 {
+ header(HttpHeaderAuthentication)
+ create("header", HttpHeaderAuthentication::class)
+ }
+ }
+ }
}
}
}
}
-
-signing {
- required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
- sign publishing.publications.mavenJava
- isRequired = gradle.taskGraph.hasTask("uploadArchives")
- sign(publishing.publications["mavenJava"])
-}
diff --git a/service/src/main/java/org/whispersystems/signalservice/api/NotSavedException.java b/service/src/main/java/org/whispersystems/signalservice/api/NotSavedException.java
new file mode 100644
index 00000000..05d77d1f
--- /dev/null
+++ b/service/src/main/java/org/whispersystems/signalservice/api/NotSavedException.java
@@ -0,0 +1,4 @@
+package org.whispersystems.signalservice.api;
+
+public class NotSavedException extends Exception {
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
+ }
diff --git a/service/src/main/java/org/whispersystems/signalservice/api/SignalWebSocket.java b/service/src/main/java/org/whispersystems/signalservice/api/SignalWebSocket.java
index 5a98f3c4..dff24940 100644
--- a/service/src/main/java/org/whispersystems/signalservice/api/SignalWebSocket.java
+++ b/service/src/main/java/org/whispersystems/signalservice/api/SignalWebSocket.java
@@ -243,6 +243,7 @@ public final class SignalWebSocket {
while (true) {
WebSocketRequestMessage request = getWebSocket().readRequest(timeout);
WebSocketResponseMessage response = createWebSocketResponse(request);
+ boolean sendResponse = true; // indicates the acknowledgement should be sent to the server
try {
if (isSignalServiceEnvelope(request)) {
Optional<String> timestampHeader = findHeader(request);
@@ -258,13 +259,19 @@ public final class SignalWebSocket {
SignalServiceEnvelope envelope = new SignalServiceEnvelope(request.getBody().toByteArray(), timestamp);
- callback.onMessage(envelope);
+ try {
+ callback.onMessage(envelope);
+ } catch (NotSavedException e) {
+ sendResponse = false;
+ }
return Optional.of(envelope);
} else if (isSocketEmptyRequest(request)) {
return Optional.empty();
mavenCentral()
mavenLocal()
}
} finally {
- getWebSocket().sendResponse(response);
+ if(sendResponse) {
+ getWebSocket().sendResponse(response);
+ }
}
}
}
@@ -315,6 +322,6 @@ public final class SignalWebSocket {
* received.
*/
public interface MessageReceivedCallback {
- void onMessage(SignalServiceEnvelope envelope);
+ void onMessage(SignalServiceEnvelope envelope) throws NotSavedException;
}
}
diff --git a/settings.gradle b/settings.gradle
index 8861c008..8dd03423 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,6 +1,5 @@
enableFeaturePreview('VERSION_CATALOGS')
-include ':android'
include 'libsignal-service'
project(':libsignal-service').projectDir = file('service')
--
2.30.2
2.39.2

View file

@ -3,16 +3,16 @@ import requests
import hashlib
import json
VERSION = "0.17.0"
VERSION = "0.36.1"
TARGETS = [
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"arm-unknown-linux-gnueabihf",
"armv7-unknown-linux-gnueabihf",
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-unknown-linux-musl",
"aarch64-apple-darwin"
# "x86_64-apple-darwin",
# "x86_64-unknown-linux-musl",
# "aarch64-apple-darwin"
]
urlFormat = "https://gitlab.com/api/v4/groups/6853927/-/packages/maven/org/signald/libsignal-client-{target}/{version}/libsignal-client-{target}-{version}.{ext}"