@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"
}
}