126 lines
5.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"name": "run-android",
"implementation": "/packages/react-native/src/executors/run-android/run-android.impl.ts",
"schema": {
"version": 2,
"outputCapture": "direct-nodejs",
"cli": "nx",
"$id": "NxReactNativeRunAndroid",
"$schema": "http://json-schema.org/schema",
"title": "Run Android application",
"description": "Run Android target options.",
"type": "object",
"presets": [
{
"name": "Run Android for the current device architecture",
"keys": ["activeArchOnly"]
},
{
"name": "Lists all available Android devices and simulators",
"keys": ["listDevices"]
},
{ "name": "Run Android without metro cache", "keys": ["resetCache"] }
],
"properties": {
"variant": {
"type": "string",
"description": "Specify your app's build variant (e.g. `debug`, `release`).",
"default": "debug",
"examples": ["debug", "release"],
"x-deprecated": "Deprecated from @react-native-community/cli, use mode instead, e.g. mode=debug. Will be remove in Nx 17."
},
"jetifier": {
"type": "boolean",
"description": "Run Jetifier the AndroidX transition tool. By default it runs before Gradle to ease working with libraries that don't support AndroidX yet.",
"x-deprecated": "Deprecated from @react-native-community/cli. Will be remove in Nx 17."
},
"appId": {
"type": "string",
"description": "Specify an `applicationId` to launch after build. If not specified, `package` from `AndroidManifest.xml` will be used."
},
"appIdSuffix": {
"type": "string",
"description": "Specify an `applicationIdSuffix` to launch after build."
},
"mainActivity": {
"type": "string",
"description": "Name of the activity to start.",
"default": "MainActivity"
},
"deviceId": {
"type": "string",
"description": "Builds your app and starts it on a specific device/simulator with the given device id (listed by running `adb devices` on the command line)."
},
"listDevices": {
"type": "boolean",
"description": "Lists all available Android devices and simulators and let you choose one to run the app",
"default": false
},
"binaryPath": {
"type": "string",
"description": "Path relative to project root where pre-built .apk binary lives."
},
"mode": {
"type": "string",
"description": "Specify your app's build variant",
"default": "debug",
"examples": ["debug", "release"],
"x-priority": "important"
},
"packager": {
"type": "boolean",
"description": "Launch packager while building",
"default": true
},
"port": {
"type": "number",
"description": "The port where the packager server is listening on.",
"default": 8081
},
"tasks": {
"type": "array",
"items": { "type": "string" },
"description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments.",
"examples": [
"assembleDebug",
"assembleRelease",
"bundleDebug",
"bundleRelease",
"installDebug",
"installRelease"
]
},
"activeArchOnly": {
"type": "boolean",
"description": "Build native libraries only for the current device architecture for debug builds.",
"examples": ["x86_64", "arm64-v8a"],
"default": false
},
"extraParams": {
"type": "string",
"description": "Custom params passed to gradle build command"
},
"interactive": {
"type": "boolean",
"description": "Explicitly select build type and flavour to use before running a build"
},
"sync": {
"type": "boolean",
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
"default": true
},
"resetCache": {
"type": "boolean",
"description": "Resets metro cache.",
"default": false
}
},
"examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"run-android\": {\n \"executor\": \"@nrwl/react-native:run-android\",\n \"options\": {}\n }\n }\n}\n```\n\n```bash\nnx run mobile:run-android\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Run on a specific device/simulator\" %}\nTo see all the avaiable emulators, run command:\n\n```bash\nemulator -list-avds\n```\n\nThe `deviceId` option allows you to launch your android app in a specific device/simulator:\n\n```json\n \"run-android\": {\n \"executor\": \"@nrwl/react-native:run-android\",\n \"options\": {\n \"deviceId\": \"Pixel_5_API_30\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Run the debug/release app\" %}\nThe `mode` option allows to specify the build variant, such as `debug` or `release`.\n\n```json\n \"run-android\": {\n \"executor\": \"@nrwl/react-native:run-android\",\n \"options\": {\n \"mode\": \"release\"\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n"
},
"description": "Runs Android application.",
"aliases": [],
"hidden": false,
"path": "/packages/react-native/src/executors/run-android/schema.json",
"type": "executor"
}