Commit Graph

8 Commits

Author SHA1 Message Date
Jim Cummins 10ad47a711 Fix run-android to execute app on all connected devices
Summary:**EDIT: **

This has been updated to simply fix the `run-android` command so that it runs on all connected devices instead of throwing an error.

**Original PR description:**

This adds a new command to the react-native CLI. When executed this command will install and successfully execute your app on all connected Android devices:

`react-native run-android-all`

Closes #5901

**Note:** I wasn't sure how to approach this API since it seems a bit like a flag, but I didn't see any other flags implemented in the cli so it seems like the current trend is to keep all commands to a single phrase. I am open to changing this if need be.
Closes https://github.com/facebook/react-native/pull/5902

Differential Revision: D2976580

Pulled By: mkonicek

fb-gh-sync-id: e7f734478f719cf59e0192b5f4be3f6408c31964
shipit-source-id: e7f734478f719cf59e0192b5f4be3f6408c31964
2016-03-08 12:12:30 -08:00
nmccready 970782d147 run-android Chose your Term for OSX, and Linux
Summary:Main goal is to get this passed for OSX. I assume this works for linux; please verify. Also if specs need to be added, please suggest
an implementation as there is no __test__ dir for andriod.

using yargs (already a dependency) to allow other terminals besides OSX crummy default terminal. Like (iterm) :)

main use case:

` react-native run-android --open iterm`

The nice thing about this in ITERM is it opens another tab by default which is way less intrusive then OSX default term.
Closes https://github.com/facebook/react-native/pull/5232

Differential Revision: D3011590

Pulled By: mkonicek

fb-gh-sync-id: 7e2a004b3018b4d70aafadf4e9be9682561d7919
shipit-source-id: 7e2a004b3018b4d70aafadf4e9be9682561d7919
2016-03-04 21:55:27 -08:00
Alexandr Pantyuhov 46422ddd99 Ability to supply product flavor for `react-native run-android` command
Summary:This small update to runAndroid.js allows to specify product flavor as optional argument, like that:
`react-native run-android --option-flavor=staging`

This option is useful when developing complex applications that require some flavor-specific functionality. More information about productFlavors can be found here: http://developer.android.com/intl/ru/tools/building/configuring-gradle.html
Closes https://github.com/facebook/react-native/pull/6010

Differential Revision: D3011662

Pulled By: mkonicek

fb-gh-sync-id: ce730a17340c1f21b5d75f28a784db4d6fd99725
shipit-source-id: ce730a17340c1f21b5d75f28a784db4d6fd99725
2016-03-04 20:27:23 -08:00
djhi b9ed72a043 Added a `root` option to the `run-android` command
Summary:Added a `root` option to the `run-android` command allowing to run it from a parent directory.

Use case: project is organized like this
```
- api
- apps
---- web
---- react-native
- package.json
```
You can use the root option on `react-native start` but not on `run-android`. This pr fixes that.
Closes https://github.com/facebook/react-native/pull/5597

Differential Revision: D2959523

Pulled By: mkonicek

fb-gh-sync-id: 03fb74b201fe9e89bf6fab80c9a98ca708464261
shipit-source-id: 03fb74b201fe9e89bf6fab80c9a98ca708464261
2016-02-21 16:53:32 -08:00
Felix Oghina 96b76fc85f fix run-android looking for packager in wrong place
Summary: Possibly leftover from the CLI migration.

public

Reviewed By: vjeux

Differential Revision: D2626589

fb-gh-sync-id: 22e44b7276bca136cde375a6d6d5af3bf0811767
2015-11-06 12:05:28 -08:00
Martin Konicek 4411ad49a4 More descriptive error message when Gradle build/install fails
Summary: Inspired by: https://twitter.com/geirmanc/status/660275638637477889

There are many reasons why the Gradle build could fail and the best
thing to do is to read the error message.

We can provide some hints in the most common cases though.

public

Reviewed By: vjeux

Differential Revision: D2604747

fb-gh-sync-id: 1aa83abb9ec823c03814dcc31d630a8f1914cf5c
2015-11-03 03:48:26 -08:00
Martín Bigio bcf762af60 Move files from `packager/` to `local-cli`
Summary: public

This is not only to put the files on a place where it makes more sense but also to allow to use ES6 features on them as `/packager` is not whitelisted on `babel`.

Reviewed By: mkonicek

Differential Revision: D2577267

fb-gh-sync-id: b69a17c0aad349a3eda987e33d1778d97a8e1549
2015-10-26 15:38:14 -07:00
Martín Bigio 849aa4dae6 Move `private-cli` commands to `local-cli`
Summary: public

We cannot remove `local-cli` because is referenced by the global cli explicitly. If we do so, people would have to upgrate this global thin cli which will cause some pain. So, lets move `private-cli` commands into `local-cli` instead.

Reviewed By: frantic

Differential Revision: D2571983

fb-gh-sync-id: 712c29430203660fb6f0d5f23813cb2a7156ee48
2015-10-26 15:36:04 -07:00