Skip to content

Commit 2d6d017

Browse files
authored
Merge pull request #69 from matrix-org/doc/improve-readme
2 parents 6e69476 + 9996133 commit 2d6d017

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

README.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,65 @@ This repository is used for distributing kotlin releases of the Matrix Rust SDK.
44

55
## Releasing
66

7+
There is a ['Release SDK Library (parallel)'](https://github.com/matrix-org/matrix-rust-components-kotlin/actions/workflows/release_sdk_parallel.yml) Github Actions workflow you can run with a parameter for the SDK branch or SHA - tags don't work correctly at the moment - and the new version name to release.
8+
There is also a 'Release Crypto Library' one that does the same for the crypto library.
9+
10+
If you want to do it manually instead:
11+
712
You need to set GITHUB_API_TOKEN in your env to let the script be able to commit and push, with this configuration:
813
- Content: Read and Write;
914
- Metadata: Read only.
1015

11-
Make sures to also have setup the maven credentials and gpg key in your [env](scripts/publish-root.gradle)
16+
Make sure to also have setup the maven credentials and gpg key in your [env](scripts/publish-root.gradle)
1217

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

1621
Usage :
17-
18-
`python3 ./scripts/release.py --version 0.1.3 --ref main --module SDK`
19-
22+
```
23+
# To build the SDK/crypto library binaries from the matrix-rust-sdk repo:
24+
./scripts/build.sh -p <matrix-rust-sdk-path> -m <sdk/crypto> -r
25+
# To release the built SDK/crypto library binaries to maven:
26+
python3 ./scripts/release_sdk.py --version <version> --linkable-ref <sdk-branch/SHA> --module <SDK/CRYPTO>
27+
```
2028

2129
## Testing locally
2230
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.
2331
You can use the build script to generate the AAR file for testing. Be sure to have checked out the matrix-rust-sdk first.
2432

33+
34+
The `-t` argument needs a valid architecture to build. For Android, these are:
35+
- aarch64-linux-android
36+
- armv7-linux-androideabi
37+
- i686-linux-android
38+
- x86_64-linux-android
39+
40+
Alternatively, to build only the host's architecture, you can use the `-l` argument.
41+
42+
Usage:
43+
2544
To build the main crate (eg, for Element-X):
2645
```
2746
./scripts/build.sh -p <matrix-rust-sdk-path> -m sdk -l
2847
```
2948

49+
Or:
50+
```
51+
./scripts/build.sh -p <matrix-rust-sdk-path> -m sdk -t <arch>
52+
```
53+
3054
To build just the crypto crate (eg, for Element Android classic), use this instead:
3155
```
32-
./scripts/build.sh -p matrix-rust-sdk-path -m crypto -l
56+
./scripts/build.sh -p <matrix-rust-sdk-path> -m crypto -l
3357
```
3458

3559
Other useful flags:
3660

3761
- `-o OUTPUT_DIR`: Moves the generated AAR file to the dir `OUTPUT_DIR`.
3862
- `-r`: Produces a release build instead of a development one.
3963

64+
You should then import this AAR in your project.
65+
4066
## Prerequisites
4167

4268
* Android NDK

0 commit comments

Comments
 (0)