This repo hosts a simple builder of some native libraries for Android. Most of them are required for Minecraft mods and used in conjunction with the NativesPlugin in MojoLauncher.
Currently supported libraries are:
- zstd-jni (vanilla and DH-patched builds in the same AAR)
- lame4j-svc
- opus4j-svc
- rnnoise4j-svc
- speex4j-svc
- sqlite-jdbc
- SDL2Compat
- physx-jni (aarch64 only for now)
- Generate bindings in CI
- Download SQLite-jdbc amalgamation in CI
- Replace some CMakeLists patches with overrides
- Build vanilla ZSTD as well, not only the one patched for DH
- Build diff versioned binaries, assemble meta? (depending on how mojo implements natives version mapping)
There are 3 ways to get the AAR file:
- Releases: Download the build we marked as stable from releases section.
- Nightly.link: Download the latest pre-built AAR file directly from nightly.link without needing a GitHub account.
- Automated builds: Same as builds from nightly.link, except directly from GitHub Actions. You will need a GitHub account to download them.
To build the AARs yourself it is recommended to fork this repo and enable CI workflows.
To build an AAR locally, clone the repo with submodules, apply the patches listed in ./.github/workflows/build.yml and run ./gradlew :app:assembleRelease. The DH preparation step generates app/src/main/zstd-dh, so the resulting AAR contains both ZSTD variants.
Some parts of the build scripts were generated by or derived from LLM generated code. Any code generated by LLM is reviewed by a human and blindly slopped code is not accepted in this repository.
This builder uses the libraries directly through submodules, so if you need to check their license, just navigate to the app/src/main directory.
Additionally, this build holds SDL3 headers which were extracted from SDL repository. They're licensed under the Zlib license.
The AGENTS.md has been inspired by the one from Gitea.