WIP <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
108 lines
4.5 KiB
JSON
108 lines
4.5 KiB
JSON
{
|
|
"name": "run-android",
|
|
"implementation": "/packages/react-native/src/executors/run-android/run-android.impl.ts",
|
|
"schema": {
|
|
"version": 2,
|
|
"continuous": true,
|
|
"outputCapture": "direct-nodejs",
|
|
"cli": "nx",
|
|
"$id": "NxReactNativeRunAndroid",
|
|
"$schema": "https://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": {
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"port": {
|
|
"type": "number",
|
|
"description": "The port where the packager server is listening on.",
|
|
"default": 8081
|
|
},
|
|
"tasks": {
|
|
"oneOf": [
|
|
{ "type": "array", "items": { "type": "string" } },
|
|
{ "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.",
|
|
"default": false
|
|
},
|
|
"extraParams": {
|
|
"oneOf": [
|
|
{ "type": "array", "items": { "type": "string" } },
|
|
{ "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"
|
|
},
|
|
"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\": \"@nx/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 available 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\": \"@nx/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\": \"@nx/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"
|
|
}
|