Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to supply product flavor for react-native run-android command #6010

Closed
wants to merge 2 commits into from
Closed

Conversation

alwx
Copy link
Contributor

@alwx alwx commented Feb 18, 2016

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

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @martinbigio, @mkonicek and @foghina to be potential reviewers.

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

@alwx updated the pull request.

@martinbigio
Copy link
Contributor

cc @foghina @mkonicek

args['option-flavor'][0].toUpperCase() + args['option-flavor'].slice(1)
);
} else {
gradleArgs.push("installDebug");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Use single quotes for consistency with the rest of the file.

@mkonicek
Copy link
Contributor

Looks good in general, thanks!

Should the arg be added to the parseCommandLine call (beginning of _runAndroid)?

@facebook-github-bot
Copy link
Contributor

@alwx updated the pull request.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@alwx updated the pull request.

@alwx
Copy link
Contributor Author

alwx commented Feb 25, 2016

@mkonicek I've updated my PR. Please, check it again.
Thanks!

@mkonicek
Copy link
Contributor

One last small thing I realized: is there are a reason to call it --option-flavor rather than --flavor?

How about react-native run-android --flavor=staging? Would that make sense?

Sorry for the back and forth on this.

@facebook-github-bot
Copy link
Contributor

@alwx updated the pull request.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@alwx updated the pull request.

@facebook-github-bot
Copy link
Contributor

@alwx updated the pull request.

@alwx
Copy link
Contributor Author

alwx commented Feb 29, 2016

@mkonicek I've updated it. Please, check it again.

@mkonicek
Copy link
Contributor

mkonicek commented Mar 4, 2016

Thanks for the ping @alwx!

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review.

@ghost ghost closed this in 46422dd Mar 5, 2016
pglotov pushed a commit to pglotov/react-native that referenced this pull request Mar 15, 2016
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 facebook#6010

Differential Revision: D3011662

Pulled By: mkonicek

fb-gh-sync-id: ce730a17340c1f21b5d75f28a784db4d6fd99725
shipit-source-id: ce730a17340c1f21b5d75f28a784db4d6fd99725
grabbou pushed a commit to react-native-community/cli that referenced this pull request Sep 26, 2018
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 facebook/react-native#6010

Differential Revision: D3011662

Pulled By: mkonicek

fb-gh-sync-id: ce730a17340c1f21b5d75f28a784db4d6fd99725
shipit-source-id: ce730a17340c1f21b5d75f28a784db4d6fd99725
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants