0
0
mirror of https://github.com/signalapp/libsignal.git synced 2024-09-20 03:52:17 +02:00
Commit Graph

9 Commits

Author SHA1 Message Date
Sergey Skrobotov
d7a4b8c817 libsignal-net: ChatService jni bridge 2024-03-21 13:19:27 -07:00
moiseev-signal
f9471c9c68
Set up and apply code formatting for Java 2023-08-22 09:15:23 -07:00
Jordan Rose
64f0b5e782 java: Allow building only for desktop+server with -PskipAndroid 2023-04-18 14:25:38 -07:00
Jordan Rose
98fd87ee9b Android: Add very basic Curve25519 benchmarks 2022-12-02 17:14:06 -08:00
Jordan Rose
f98b7394ec Gradle: Conditionally throw an error when building without JDK 11
Previously the project would error out during the configuration stage,
since the Android Gradle plugin requires JDK 11 to even load. Now it
throws an error if you try to build a top-level task or a task in the
Android subproject, but allows you to build, e.g. 'client:test' with
no problems.
2022-03-22 10:19:47 -07: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
Jordan Rose
0b9dffdd88 Java: Update to Gradle 7.4, and several other build system updates
- Switch to the modern maven-publish plugin.

- Bump the Android target SDK version to 30 to match the app.
  (The minimum is still 19.)

- Bump the Java source compatibility version to 1.8.

- Bump the Android command line tools used in Docker to match the app.

- Bump the JDK used in Docker to OpenJDK 11, matching the app.

- Switch to the androidx testing libraries for emulator testing.

- Drop unused trove4j Gradle plugin.

- Lots of cleanup and refactoring.
2022-03-07 16:51:19 -08:00
Jordan Rose
246c4e4fb9 java: Remove "tests" Gradle module
The Java and Android targets are set up to both run common tests in
the top-level tests/ directory, which will be useful if we ever want
tests that only run in the Android emulator, or do *not* run in the
Android emulator. However, that top-level folder doesn't need to be a
Gradle module itself.
2022-03-07 16:51:19 -08:00
Jack Lloyd
69a4b40423 Import v2.8.1 of libsignal-protocol-java
No changes vs that version in this commit
2020-11-05 17:59:09 -05:00