appflow build android
This command creates an Android build on Appflow. While the build is running, it prints the remote build log to the terminal.
appflow build android [debug, release] [flags]
Examples
appflow build android debug --app-id=a1234bc --commit=a9eb85e
appflow build android release --app-id=b3456cd --commit=4c511f1
appflow build android debug --app-id=a1234bc --commit=a9eb85e --environment="My Custom Environment Name"
appflow build android debug --app-id=a1234bc --commit=a9eb85e --native-config="My Custom Native Config Name --native-app-preview"
appflow build android release --app-id=b3456cd --commit=4c511f1 --aab --apk --apk-name="my-app-prod.apk" --webhook-url="http://webhook.com/test"
Flags
Name | Type | Default | Description |
---|---|---|---|
--app-id [required] | string | Appflow app id | |
--aab | boolean | false | Download aab file |
--aab-name | string | Download aab and rename file. Example: mapp.aab | |
--apk | boolean | false | Download apk file |
--apk-name | string | Download apk and rename file. Example: myapp.apk | |
--app-bundle-id | string | Native config application bundle ID. Example: com.company.app | |
--app-name | string | Native config application name | |
--build-stack | string | Target platform ("Linux - 2023.10" / "Linux - 2024.10" / "Linux - 2024.06" / "Linux - 2023.06" / "Linux - 2023.04"), defaults to latest stack | |
--commit | string | Commit sha | |
--dependency-caching | boolean | false | Enabled NPM caching |
--detached | boolean | false | Asynchronously run appflow build |
--env | string[] | [] | Variables to expose to your build. Variables defined this way override those loaded using the env-file flag. Example: --env VAR=value |
--env-file | string[] | [] | Files declaring environment variables to expose to your build. Variables from later files overwrite variables from earlier files. |
--environment | string | The name of the predefined Appflow Environment to expose to your build | |
--live-update-app-id | string | Appflow application ID | |
--live-update-channel-name | string | Live Update channel name | |
--live-update-disable-deploy | boolean | false | Disable Live Updates from being applied |
--live-update-max-store | number | 2 | Number of previous Live Updates that can be stored on a device |
--live-update-method | string | "background" | Live Update method to determine how the app will check for and apply updates, "background", "auto", or "none" |
--live-update-min-background-duration | number | 30 | Number of seconds the app needs to be in the background for it to have been considered "closed" |
--native-app-preview | boolean | false | Enable app preview directly in the browser via a secure public URL with Appetize (only compatible with debug builds) |
--native-config | string | The name of the native config to use for the build. Native configs are defined in the UI. | |
--secret | string[] | [] | Secrets to expose to your build. Example: --secret VAR=value |
--signing-cert | string | Signing certificate (not required for debug builds) | |
--webhook-url | string | Schedules a webhook that executes after the build finishes. The payload will include a URL for downloading build artifacts if the build succeeds. |
Global Flags
Name | Type | Default | Description |
---|---|---|---|
-h, --help | boolean | false | Print help information for command |
--config | string | Appflow config file (.appflow.yaml by default) | |
--json | boolean | false | For commands with output, shortcut to print as JSON |
--output | string | "text" | For commands with output, print as [json] or human readable [text] |
--token | string | Ionic authorization token |
Outputs
Name | Type | Description |
---|---|---|
appId | string | Your app's unique identifier in Appflow. |
buildId (optional) | number | A unique identifier for a build done in Appflow. |
buildNumber (optional) | number | An app-specific build number for builds done in Appflow. |
buildStatus | "CREATED" | "PENDING" | "RUNNING" | "BUILDING" | "FAILED" | "SUCCESS" | "CANCELED" | The current state of your build in Appflow. |
platform | "ANDROID" | "IOS" | "WEB" | The ecosystem you are building for. |
commit | string | The commit hash. |
buildStack | object | A Build Stack in Appflow. |
.name | string | The friendly name for a Build Stack in Appflow. |
.dependencies (optional) | object[] | The list of pinned software versions for a Build Stack in Appflow. |
.name | string | The name of a software used by a Build Stack in Appflow. |
.version | string | The pinned version of a software used by a Build Stack in Appflow. |
environment (optional) | object | The Environment for your build in Appflow. |
.name | string | The name of an Environment you've created in Appflow. |
.files (optional) | string[] | The list of local environment files provided to this command. |
.variables (optional) | { "string": string, ... } | The combined list of all environment variables used for a build. |
.secrets (optional) | { "string": string, ... } | The combined list of all environment secrets used for a build. The key values are not downloaded; the key names are just displayed for reference. |
artifacts (optional) | { "APK": string, ... } | All artifacts that were saved by Appflow during a build, and are available for download. |
dependencyCaching (optional) | boolean | Whether or not dependency caching was enabled for this build. |
webhooks (optional) | object[] | List of associated webhooks. |
.url | string | The URL of the associated webhook. |
.status | generated.BuildNotificationStatus | The status of the associated webhook. |
signingCert (optional) | string | The signing certificate used by Appflow to deploy a build to the App Stores. |
buildType | string | The kind of native build done by Appflow, e.g. dev or release builds. |
nativeConfig (optional) | object | A Native Config to manipulate your build in Appflow. |
.name | string | The name of a Native Config you've created in Appflow. |
.base (optional) | object | These Native Config variables allow you to override properties on a Native Build. |
.name (optional) | string | Override the home screen name for a Native Build. |
.bundleId (optional) | string | Override the bundle identifier for a Native Build. |
.liveUpdatesConfig (optional) | object | These Native Config variables allow you to override properties used by the Live Updates Plugin. |
.appId (optional) | string | Your app's unique identifier in Appflow. |
.channelName (optional) | string | The name of a channel that hosts Live Updates. |
.maxStore (optional) | number | The maximum number of updates for the Live Updates Plugin to store on the device. |
.minBackgroundDuration (optional) | number | The number of seconds the app needs to be in the background before the Live Updates Plugin considers it closed. |
.updateMethod (optional) | string | The update method for the Live Updates Plugin to use. |
.disableDeploy (optional) | boolean | Whether the Live Updates Plugin should be disabled or not. |
appetizeUrl (optional) | string | The URL of the Appetize preview. |
Successful Output
{
"appId": "052b32ac",
"buildId": 6010455,
"buildNumber": 25,
"buildStatus": "SUCCESS",
"platform": "ANDROID",
"commit": "cef1sdca",
"buildStack": {
"name": "Linux - 2022.10",
"dependencies": [
{
"name": "Cordova CLI",
"version": "11.0.0"
},
{
"name": "Ionic CLI",
"version": "6.20.3"
},
{
"name": "Node.js",
"version": "18.12.1"
},
{
"name": "Node.js versions",
"version": "14.21.1 / 16.18.1 / 18.12.1"
},
{
"name": "npm",
"version": "8.19.3"
},
{
"name": "Yarn",
"version": "1.22.19"
},
{
"name": "Python",
"version": "3"
},
{
"name": "Debian",
"version": "11.4"
},
{
"name": "Gradle",
"version": "5.6.4"
},
{
"name": "OpenJDK",
"version": "1.8.0_332 / 11.0.16"
},
{
"name": "Android SDK",
"version": "27-33"
}
]
},
"environment": {
"name": "Test Environment",
"files": [
".env-file1",
".env-file2"
],
"variables": {
"Var1": "value1",
"Var2": "value2"
},
"secrets": {
"Sec1": "********",
"Sec2": "********"
}
},
"artifacts": {
"AAB": "ionic-app-main-cef1sdca-debug.aab",
"APK": "ionic-app-main-cef1sdca-debug.apk"
},
"dependencyCaching": null,
"webhooks": null,
"signingCert": "Android Signing Certificate Name",
"buildType": "DEBUG",
"nativeConfig": {
"name": "Default Configuration",
"base": {
"name": "Ionic App",
"bundleId": "com.ionicapp.bundle"
},
"liveUpdatesConfig": {
"appId": "052b32ac",
"channelName": "Production",
"maxStore": 3,
"minBackgroundDuration": 30,
"updateMethod": "auto",
"disableDeploy": false
}
},
"appetizeUrl": null
}
Detached Output
{
"appId": "052b32ac",
"buildId": 6010455,
"buildNumber": 25,
"buildStatus": "CREATED",
"platform": "ANDROID",
"commit": "cef1sdca",
"buildStack": {
"name": "Linux - 2022.10",
"dependencies": [
{
"name": "Cordova CLI",
"version": "11.0.0"
},
{
"name": "Ionic CLI",
"version": "6.20.3"
},
{
"name": "Node.js",
"version": "18.12.1"
},
{
"name": "Node.js versions",
"version": "14.21.1 / 16.18.1 / 18.12.1"
},
{
"name": "npm",
"version": "8.19.3"
},
{
"name": "Yarn",
"version": "1.22.19"
},
{
"name": "Python",
"version": "3"
},
{
"name": "Debian",
"version": "11.4"
},
{
"name": "Gradle",
"version": "5.6.4"
},
{
"name": "OpenJDK",
"version": "1.8.0_332 / 11.0.16"
},
{
"name": "Android SDK",
"version": "27-33"
}
]
},
"environment": {
"name": "Test Environment",
"files": [
".env-file1",
".env-file2"
],
"variables": {
"Var1": "value1",
"Var2": "value2"
},
"secrets": {
"Sec1": "********",
"Sec2": "********"
}
},
"artifacts": {},
"dependencyCaching": null,
"webhooks": null,
"signingCert": "Android Signing Certificate Name",
"buildType": "DEBUG",
"nativeConfig": {
"name": "Default Configuration",
"base": {
"name": "Ionic App",
"bundleId": "com.ionicapp.bundle"
},
"liveUpdatesConfig": {
"appId": "052b32ac",
"channelName": "Production",
"maxStore": 3,
"minBackgroundDuration": 30,
"updateMethod": "auto",
"disableDeploy": false
}
},
"appetizeUrl": null
}