Skip to content

matrix-org/matrix-rust-components-kotlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

95fd636 · May 13, 2025
Oct 17, 2024
May 13, 2025
Dec 18, 2024
Feb 7, 2024
May 15, 2024
May 13, 2025
Jan 23, 2024
Jul 26, 2023
Feb 28, 2022
Jan 22, 2024
Feb 16, 2023
Jan 19, 2024
Feb 5, 2024
Jan 19, 2024
Feb 23, 2023

Repository files navigation

Matrix rust components kotlin

This repository is used for distributing kotlin releases of the Matrix Rust SDK. It'll provide the corresponding aar and also publish them on maven.

Releasing

You need to set GITHUB_API_TOKEN in your env to let the script be able to commit and push, with this configuration:

  • Content: Read and Write;
  • Metadata: Read only.

Make sures to also have setup the maven credentials and gpg key in your env

Whenever a new release of the underlying components is available, we need to tag a new release in this repo to make them available. This is done with the release script found in the scripts directory. It'll also push the release to the maven repository.

Usage :

python3 ./scripts/release.py --version 0.1.3 --ref main --module SDK

Testing locally

As the package vendors a pre-built binary of the SDK, all local development is done via the SDK's repo instead of this one. You can use the build script to generate the AAR file for testing. Be sure to have checkout the matrix-rust-sdk first.

Usage:

./scripts/build.sh -p matrix-rust-sdk-path -m sdk -t aarch64-linux-android

To build just the crypto crate, use this instead:

./scripts/build.sh -p matrix-rust-sdk-path -m crypto -t aarch64-linux-android

Other useful flags:

  • -o OUTPUT_DIR: Writes the output AAR file to the dir OUTPUT_DIR.
  • -r: Produces a release build instead of a development one.

Prerequisites

  • Android NDK
  • the Rust toolchain
  • cargo-ndk cargo install cargo-ndk
  • protoc brew install protobuf or downloading here
  • android targets (e.g. rustup target add \ aarch64-linux-android \ armv7-linux-androideabi \ x86_64-linux-android \ i686-linux-android)

License

Apache-2.0