JVM distribution repository for rgb-lib using Linux C-FFI artifacts built
from a git submodule.
- Keep
rgb-libupstream clean and binding-agnostic. - Avoid committing native binaries to git.
- Build native artifacts from source in CI.
- Publish JVM artifacts to Maven with selectable release modes.
- Keep Maven Central releases lean by excluding the large native tarball.
vendor/rgb-libis a git submodule pinned toUTEXO-Protocol/rgb-lib.- Native artifacts are generated during CI/local builds:
librgblibcffi.sorgblib.hrgblib.hpp
- JVM artifact embeds Linux x86_64 native library in resources.
- Optional standalone native tarball is only attached when publishing to GitHub Packages.
Prerequisites:
- Java 17
- Rust toolchain
- Linux build tools (
build-essential)
Build:
git submodule update --init --recursive
gradle clean buildNative bundle location after build:
build/native/linux-x86_64/build/native-bundle/rgb-lib-jvm-linux-x86_64-<version>.tar.gz
Use Actions -> Release JVM SDK with:
version: artifact versionpublish_mode:none(build only)github(publish to GitHub Packages, includes standalone native tarball)central(publish to Maven Central, excludes standalone native tarball)both(publish to both)
rgb_lib_ref: branch/tag/sha for the submodule build source
MAVEN_GROUP_ID(optional, defaultcom.utexo)MAVEN_ARTIFACT_ID(optional, defaultrgb-lib-jvm)
MAVENCENTRAL_USERNAMEMAVENCENTRAL_PASSWORDGPG_SECRET_KEYGPG_KEY_NAMEGPG_PASSPHRASE
ORG_READ_TOKEN— PAT with read access to privateUTEXO-Protocol/*repositories