Commit Graph

83 Commits

Author SHA1 Message Date
Jordan Rose
e419b9cf01 Update Gradle, AGP, Kotlin versions 2026-01-30 17:14:36 -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
26f46d3d68 android: Bump minSdkVersion to 23 2025-11-06 15:51:06 -08:00
Andrew
db62792bb2 Cleanup unused AndroidManifest.xml parameters. 2025-10-16 14:51:30 -05:00
gram-signal
533d11dd7c Remove usePqRatchet from client-facing code, defaulting to always use. 2025-10-02 11:32:36 -07:00
andrew-signal
90c66511dc Java: Update Android Gradle Plugin to 8.10.1 to match Signal-Android. 2025-09-29 14:19:58 -04:00
Jordan Rose
f18b92ebe2 android: Add an explicit CertificateVerifier.shouldCheckRevocation
The default value is 'false', which is a change from upstream
rustls-platform-verifier, but consistent with the general platform
recommendations for certificate verification on Android, including
OkHttp's behavior.
2025-09-16 15:08:02 -07:00
Jordan Rose
5843f17141 java: Simplify build by including rustls' CertificateVerifier directly 2025-09-16 15:08:02 -07:00
Jordan Rose
aee436a43c java: Update Spotless to 7.2.1 2025-08-07 13:46:28 -07:00
Alex Bakon
7aef688310 Split Base64 utility to reduce reflection 2025-07-22 15:33:22 -04:00
Jordan Rose
25613c488a android: Add a sealed-sender encrypt benchmark 2025-07-03 11:07:01 -07:00
andrew-signal
54a302d3bc Add short allowlist of CRL Distribution Point URLs for CRL fetching on Android 2025-06-23 17:48:48 -05:00
Jordan Rose
47eae0d153 Don't strip libraries for the Android benchmarks
Otherwise, the Android Studio "profile" option is much less useful.
2025-06-23 14:10:27 -07: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
Jordan Rose
5001df1ee4 Kotlin: use explicitApi() mode 2025-06-13 10:27:37 -07:00
Jordan Rose
1b469bb6c7 Make acknowledgments platform-specific 2025-06-12 16:01:33 -07:00
Alex Bakon
a32aca9bce Remove Java Curve class 2025-06-12 17:24:31 -04:00
Alex Bakon
3c89a5fa07 Colocate Kotlin sources with Java 2025-06-12 16:00:05 -04:00
Jordan Rose
f40d20a72f Add CompletableFuture.await() helper for Kotlin clients
Test it by porting several tests from FutureTest.java to Kotlin and
using Kotlin idioms for awaiting and cancellation.
2025-06-05 12:34:15 -07:00
Alex Bakon
033abcf96f Support checking Java @CalledFromNative annotation 2025-06-02 13:02:41 -04:00
Jordan Rose
26d92fb09e jni: Add a debug mode to type-tag bridged object handles
Use `./gradlew -P jniTypeTagging` to build with type tags enabled.

This has a moderate code size cost, and an unmeasured cost in run-time
performance. On 64-bit targets, the tagging relies on bits 48..56 of 
pointers produced by the default Rust memory allocator being unused
(specifically 0), which they are on all our current targets.
2025-05-12 08:37:08 -07:00
Alex Bakon
890ac9e006 Enable account registration via Java registration service client 2025-04-29 13:41:51 -04:00
andrew-signal
1d0ae662d0 Bump Android Gradle Plugin to v8.9.0 2025-04-25 11:53:52 -06:00
andrew-signal
7a4bd18e1d Update to NDK v28.0.13004108 (current latest stable) 2025-04-09 15:46:03 -05:00
Alex Bakon
6f05a32b17 Add a smoke test for Android without _testing.so 2025-02-04 13:59:08 -05:00
Alex Bakon
0c02dd710c Fix Android benchmark compilation 2025-02-04 13:16:11 -05:00
andrew-signal
9c0f28715b Bump the version of com.library.android to match Signal-Android 2025-01-16 13:45:33 -05:00
Jordan Rose
a8814d16f8 Move all "testing-fns" APIs into libsignal-bridge-testing
This means they'll be shipped to clients, but still filtered out of
the device builds on Android (via having two separate libraries on
disk) and iOS (by not being included in non-simulator builds). The
biggest benefit of this is dropping the :android:makeTestJniLibraries
step for running libsignal's Android tests.
2024-08-27 08:29:06 -07:00
Jordan Rose
d2d68763a2 Gradle: No need to publish a separate libWithDebugSymbols artifact
Follow-up to 9d729ff0.
2024-08-27 08:23:06 -07:00
Jordan Rose
97dfb275d6 android: Update to NDK r27 (current latest) 2024-08-23 11:23:05 -07:00
Jordan Rose
4470192aa6 java: When running Cargo as part of Gradle, fall back to ~/.cargo/bin
This is important when the Gradle configuration is processed by an IDE
on macOS, which won't have had PATH set by shell login scripts.
2024-08-22 09:23:16 -07:00
Jordan Rose
21dbd79192 java: Update to Gradle 8.6 and AGP 8.4.1 to match Signal-Android 2024-08-22 09:23:16 -07:00
Jordan Rose
4a1ed695b0 java: Specify working directory relative to project root 2024-08-22 09:23:16 -07:00
Jordan Rose
9d729ff083 Re-apply "android: Don't strip debug info out of the AAR"
A revised version of the earlier 23192280:
- Uses --build-id for all archs, not just aarch64
- Also raises Gradle's memory limits
2024-07-25 14:22:56 -07:00
Alex Konradi
4c0bb6d87f Revert "android: Don't strip debug info out of the AAR" 2024-07-19 11:25:58 -04:00
Jordan Rose
2319228027 android: Don't strip debug info out of the AAR
This *greatly* increases the size of the artifacts uploaded to Maven,
but it looks like the libraries do correctly get stripped when the
final APK is built. (This was not true in the past.)

Also, make sure the built library includes a "build ID", or else the
stripped version of the library will be treated as a different
library, and all the line tables will go to waste.
2024-07-18 10:26:02 -07:00
Alex Konradi
0e4d420f69 Add libsignal-jni-testing crate with test-only functions for Java
This parallels the exiting libsignal-jni crate but exports functions from 
libsignal-bridge-testing instead of libsignal-bridge. The crate is compiled as 
a separate shared object that is included in the published libsignal package, 
but which can be excluded at Android packaging time.
2024-07-09 13:07:36 -04:00
Jordan Rose
4791773954 java: Add -P debugLevelLogs as a Gradle build option
Similar to the previous commits, but for Java/Android. If invoking
build_jni.sh directly, use `--debug-level-logs` like build_ffi.sh.

As a consequence, LOGGING IS NO LONGER AUTOMATICALLY ENABLED FOR
JAVA/ANDROID. Clients must call SignalProtocolLoggerProvider.
initializeLogging() in addition to setting a provider.
2024-06-13 12:08:31 -07:00
Jordan Rose
9d622d9bcb android: Add rustls-platform-verifier support 2024-04-24 14:13:30 -07:00
Jordan Rose
3d2471cc8b Make LIBSIGNAL_TESTING_ env vars available to Android and iOS tests
And adjust the existing ENCLAVE_SECRET tests and examples to use this
(including Rust and Node's).

This also requires adding an AndroidManifest.xml that notes the tests
might use the network.
2024-04-17 16:06:46 -07:00
Alex Konradi
06c1780a14 Hold server zkparams as pointers 2024-04-09 16:13:22 -04:00
Jordan Rose
8fb6cc31cf bridge: Make a combined endorsement for GroupSendEndorsementsResponse
Specifically, make this on the Rust side bridge layer, and tack it on
to the end of per-member endorsements for the app side to peel off
later, rather than the app layer calling back down to Rust to compute
it. This saves a fair amount of marshalling work.
2024-03-12 14:54:04 -07:00
Jordan Rose
93237adc56 Android: Add benchmarks for GroupSendEndorsement
These show quite a bit of overhead over running the Rust benchmarks
directly. Something to look into!
2024-03-12 14:54:04 -07:00
Jordan Rose
54727562fc Android: mark benchmark tests as profilable 2024-03-12 14:54:04 -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
c80ceda985 Java: Allow limiting which archs are built for Android
And use this to cut down CI testing time: only build armv7 and aarch64
slices of the real library, and x86_64 for the testing library (which
we don't even run in the every-commit CI, but we want to make sure we
haven't broken something in that configuration).
2024-03-07 10:15:57 -08:00
Alex Konradi
8959e64ed1 Build TESTING_ functions for Android test
Run tests that call native TESTING_ functions on Android. This requires 
building a separate version of libsignal_jni.so with the testing functions 
included. The test code is still omitted from the published artifacts.
2024-02-15 16:53:05 -05:00
Jordan Rose
88a25e889e Collect acknowledgments for libsignal's Cargo dependencies 2023-12-11 16:39:33 -08:00
Alex Konradi
7f023e7d46 Fix exclude for libsignal-net tests on Android
Use the path within the directory specified by srcDir without the common
prefix. Verified with ./gradlew test :android:connectedDebugAndroidTest
locally.
2023-11-16 14:47:17 -05:00