Builds the signed release AAB for a Mob Android app.
Called by mix mob.release --android. The pipeline:
- Download the Android OTP runtime (arm64) if not already cached.
- Copy the OTP tree to a temp staging dir and add:
- App + dep BEAMs (flattened into
{app_name}/) - App
priv/→{app_name}/priv/ - exqlite BEAMs →
lib/exqlite-{vsn}/ebin/(OTP lib structure needed for:code.lib_dir(:exqlite)to resolve correctly at runtime)
- App + dep BEAMs (flattened into
- Run
MobDev.OtpAssetBundle.build/2— strips unused OTP libs and optional BEAM chunks, then zips the tree toassets/otp.zip. - Run
./gradlew bundleRelease— signs the AAB using the keystore configured inandroid/keystore.properties.
MobBridge.extractOtpIfNeeded() (Kotlin) extracts otp.zip into
<filesDir>/otp/ on first launch. Without this zip the app crashes
immediately — the BEAM has no runtime or application BEAMs to load.
Summary
Functions
Runs the full Android release pipeline and returns {:ok, aab_path} or
{:error, reason}.