-
Notifications
You must be signed in to change notification settings - Fork 25k
Fix run-android behaviour when using both --deviceId and --variant #15467
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
Conversation
| function buildApk(args, gradlew) { | ||
| try { | ||
| console.log(chalk.bold('Building the app...')); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semi: Missing semicolon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the missing semicolons.
| } | ||
|
|
||
| // using '-x lint' in order to ignore linting errors while building the apk | ||
| child_process.execFileSync(gradlew, ['build', '-x', 'lint'], { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semi: Missing semicolon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the missing semicolons.
| gradleArgs.push('assemble' + | ||
| args.variant[0].toUpperCase() + args.variant.slice(1) | ||
| ); | ||
| } else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semi: Missing semicolon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the missing semicolons.
Use the correct assemble<variant> target (avoids building all targets).
Install the correct APK for the requested variant type.
Test on a newly-built project, cleaning the android build between tests:
# builds and installs app-debug.apk
$ rm -rf android/app/build
$ react-native run-android --deviceId <id>
# builds and installs app-release.apk
$ rm -rf android/app/buil
$ react-native run-android --deviceId <id> --variant release
# builds and installs app-debug.apk
$ rm -rf android/app/buil
$ react-native run-android --deviceId <id> --variant debug
|
Pushed a new commit fixing the missing semicolons. |
|
@mbarbon I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
Use the correct assemble target (avoids building all targets); install the correct APK for the requested variant type.
Test Plan
Test on a newly-built project, cleaning the android build between tests:
Thanks!
Mattia