Commit Graph

25 Commits

Author SHA1 Message Date
marc-signal
400a021c2b Log a backtrace on panic 2026-03-31 12:12:40 -04:00
Jordan Rose
d390508da5 java: Eliminate other uses of deprecated Gradle features
And add `--warning-mode fail` to the CI invocations to not regress.
2026-03-04 15:41:18 -08:00
Daeho Ro
06f30cb23d update build.gradles to support gradle v9 2026-03-04 15:41:18 -08:00
moiseev-signal
c17dc6ca7b java: Update Dokka to 2.1.0 2026-02-18 16:35:57 -08:00
Jordan Rose
3f0d2b1384 Revert "java: Publish to GitHub Packages instead of Maven Central"
This reverts commit b2c5685080.
2025-11-07 11:37:25 -08:00
Jordan Rose
b2c5685080 java: Publish to GitHub Packages instead of Maven Central 2025-11-06 16:36:17 -08:00
Jordan Rose
b2c2537277 java: Switch from javadoc to Dokka to include our Kotlin sources
The Maven publication will still contain a -javadoc jar for
consistency, but the -dokka jar is likely to have superior rendering
in practice, particularly for Kotlin-only APIs!
2025-06-18 10:57:50 -07:00
Alex Bakon
3c89a5fa07 Colocate Kotlin sources with Java 2025-06-12 16:00:05 -04:00
Alex Bakon
14adc1c74d Introduce Kotlin to the libsignal Java library 2025-05-23 09:57:41 -04:00
Jordan Rose
11544c6718 java: Omit native libraries from the sources jars
...at least partly to cut down on the space used during a build that
includes all supported architectures.
2024-08-02 09:54:43 -07:00
Jonathan Klabunde Tomer
0453438d98 Prepare libsignal-server Java build for arm64 2024-07-30 13:37:55 -07:00
Jordan Rose
4b87577969 java: Print all test outcomes as they run (not just passes)
Failures would still have been caught in the aggregate test results;
but if we're going to print successes we should print skips and
failures too. (This was just an oversight.)
2024-04-17 10:21:41 -07:00
Jordan Rose
f896129db9 Java: Update to Gradle 8.4, Android Gradle Plugin 8.3, SDK 34, Java 17
Each of these updates is required for the following update, and the
final one allows us to use 'record'.

The target SDK version is set to 33, matching the Android app.
2024-03-08 10:34:18 -08:00
Jordan Rose
caf3dade92 Java: Add -Xcheck:jni to host testing
This can give better error messages for JNI mistakes that might
otherwise crash or go unnoticed. Tested by introducing such a mistake.
(Though it's hard to do with the jni crate's safe interfaces, which is
a good thing!)

The Android Emulator always has its equivalent checks on, so the Slow
Tests are also giving us some confidence about our JNI usage.
2023-11-15 10:17:26 -08:00
ravi-signal
9c79bc97cb zkgroup: move java BackupAuthTest to server lib
This test does base64 decoding which differs between android 21 and
non-android platforms.
2023-10-26 13:15:25 -05:00
Jordan Rose
a563c9b93d Java: Add a bare-bones Future implementation for upcoming async APIs 2023-09-27 06:48:21 -07:00
Jordan Rose
3810154436 Automate the Android and Server publishing to Sonatype 2023-08-25 12:33:56 -07:00
Jordan Rose
e11a825fe3 Gradle: Adopt Nexus plugin to automatically close releases on Sonatype 2023-08-24 12:21:25 -07:00
Jordan Rose
b27f5c0f2e Gradle: Set version and group info in the root project
This will be necessary to adopt the Gradle Nexus publishing plugin,
but it's also just simpler.
2023-08-24 12:21:25 -07:00
Jordan Rose
0542686e70 Update artifact/package/module names across all three app languages
- Java: org.whispersystems:signal-client-java ->
    org.signal:libsignal-client
- Java: org.whispersystems:signal-client-android ->
    org.signal:libsignal-android
- Java: org.whispersystems:libsignal-server ->
    org.signal:libsignal-server
- Swift: SignalClient -> LibSignalClient
- NPM: @signalapp/signal-client -> @signalapp/libsignal-client
- Repository: github.com/signalapp/libsignal-client ->
    github.com/signalapp/libsignal
2022-03-23 10:49:09 -07:00
Jordan Rose
526cbab04f Gradle: Fix conditional execution of :downloadNonLinuxLibraries
This helper task was supposed to only execute when publishing the
client or server artifacts, but at the point where that was checked
the task graph *hasn't been built yet*. Instead, add the task to the
task graph unconditionally, but disable it by default, and have its
dependents enable it only when publishing.
2022-03-22 10:19:47 -07:00
Jordan Rose
bd30563044 Java: use the artifact name as the human-readable name when publishing
This matches the (explicitly-specified) name in the previous Gradle
configuration.
2022-03-11 13:31:13 -08:00
Jordan Rose
43054913ed Java: Always include Mac and Windows support when publishing
Rather than have a separate "testable" artifact, always include Mac
and Windows versions of libsignal_jni.so when publishing
signal-client-java *and* libsignal_server (though not when just
building locally).

Also, finally attach these tasks to the correct step (processResources
rather than compileJava).
2022-03-10 13:36:26 -08:00
Jordan Rose
821d72d65a Java: add back missing repository information
I deleted this for simplicity when updating to Gradle 7.4 and then
forgot to put it back.
2022-03-10 13:36:26 -08:00
Jordan Rose
7931bf0812 java: Build a separate libsignal-server artifact
Reorganize the Gradle build with three targets:

- signal-client-java (client/)
- signal-client-android (android/)
- libsignal-server (server/)

plus an additional shared/ directory for sources shared between
client/ and server/.

This maintains the distinction between signal-client-java (the Java
parts, plus a Linux libsignal_jni.so for running tests outside of the
Android emulator) and signal-client-android (contains the Android JNI
libraries, plus any Android-specific code, which for now is just
AndroidSignalProtocolLogger, which the app doesn't even use).

The new libsignal-server is built very similarly to
signal-client-java, but only contains the Java sources relevant for
the server...plus the base org.whispersystems.libsignal classes from
the original libsignal-protocol-java, because some of them are
referenced directly in our generated Native.java. (We can improve on
this in the future.) The "testable" artifact that includes macOS and
Windows versions of libsignal_jni.so is now only built for
libsignal-server, not signal-client-java; our Android development
happens on Linux, but server development happens on multiple
platforms.

Tests were recently reorganized into a top-level tests/ directory, but
now there's been another reorganization:

- client/src/test/ - tests to run on any clients
- android/src/androidTest/ - tests to run only on Android devices /
  emulators (currently none)
- server/src/test/ - tests to run specifically for the server
  (currently none)
- shared/test/ - does not exist to avoid running the same tests twice

There are no tests to run "only not on Android devices", and it's
currently assumed that all server functionality is tested by the
client tests. The Android device tests run all the client tests as
well (by direct path reference). This may not be the "best" Gradle
layout, but it's at least straightforward to read the Gradle files.

For now there's still only one native library built for both
signal-client-java and libsignal-server, but that could change in the
future.
2022-03-10 09:14:55 -08:00