bare-apk
Reference for bare-apk: Android APK and app-bundle packaging tools for Bare.
bare-apk provides Android packaging tools for Bare: build an Android App Bundle (.aab) from a manifest, derive an APK set, and produce an installable .apk. It's pure JavaScript (it shells out to the Android build tools) and is used in the Android packaging path of bare-build.
npm i bare-apkUsage
const { createAppBundle, createAPK } = require('bare-apk')
await createAppBundle('./path/to/AndroidManifest.xml', './app.aab')
await createAPK('./app.aab', './app.apk')API
await createAppBundle(manifest, out[, options])
Build an Android App Bundle (.aab) from an AndroidManifest.xml.
Options include:
options = {
targetSDK: DEFAULT_TARGET_SDK,
// Additional files and directories to include in uncompressed format
include: [],
// Resource directory to compile and compress
resources
}await createAPKSet(bundle, out[, options])
Produce an APK set from an app bundle.
Options include:
options = {
universal: false,
archive: true,
sign: false,
keystore,
keystoreKey,
keystorePassword
}await createAPK(bundle, out[, options])
Produce an installable .apk.
Options include:
options = {
sign: false,
keystore,
keystoreKey,
keystorePassword
}constants
| Constant | Description |
|---|---|
ANDROID_HOME | The Android SDK root directory. |
DEFAULT_MINIMUM_SDK | The default minimum Android SDK API level. |
DEFAULT_TARGET_SDK | The default target Android SDK API level. |
See also
- Bundle a Bare app—where app packaging fits in the build flow.
- Bare modules—the full
bare-*catalog. - Bare runtime API—the runtime this targets.