@nrwl/react-native:build-android

Build target options for Android.

Options can be configured in project.json when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/reference/project-configuration#targets.

project.json:

{ "name": "mobile", //... "targets": { //... "build-android": { "executor": "@nrwl/react-native:build-android", "outputs": [ "{projectRoot}/build/outputs/bundle", "{projectRoot}/build/outputs/apk" ], "options": {} } } }
nx run mobile:build-android

Examples

The gradleTask option accepts any custom gradle task, such as assembleDebug, assembleRelease, bundleDebug, bundleRelease:

"build-android": { "executor": "@nrwl/react-native:build-android", "outputs": [ "{projectRoot}/build/outputs/bundle", "{projectRoot}/build/outputs/apk" ], "options": { "gradleTask": "assembleDebug" } }

Options

apk

boolean

Generate apk file(s) rather than a bundle (.aab).

debug

boolean

Generate a debug build instead of a release build.

gradleTask

string

Override default gradle task incase of multi build variants