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

CLI does not build the correct productFlavor when --list-devices flag is used #37110

Closed
ste7en opened this issue Apr 26, 2023 · 2 comments
Closed
Labels
💻CLI Needs: Triage 🔍 Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library

Comments

@ste7en
Copy link

ste7en commented Apr 26, 2023

Description

Version 0.71.7 uses @react-native-community/cli 10.2.2 and @react-native-community/cli-platform-android 10.2.0.
However, when running run-android with either --list-devices or --deviceId <string> flags, the arguments passed to Gradle are build -x lint (ref) notwithstanding specifying the app flavor thruogh the --mode or the deprecated --variant flags.

This has been solved by this PR and released with v11 of react native CLI, however at the moment it is not possible to use these features with version 0.71.7.

React Native Version

0.71.7

Output of npx react-native info

info Fetching system and libraries information...
System:
OS: macOS 13.3.1
CPU: (8) arm64 Apple M2
Memory: 64.02 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.13.0
path: ~/.nvm/versions/node/v18.13.0/bin/node
Yarn:
version: 3.4.1
path: ~/.nvm/versions/node/v18.13.0/bin/yarn
npm:
version: 8.19.3
path: ~/.nvm/versions/node/v18.13.0/bin/npm
Watchman:
version: 2023.03.20.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.11.3
path: /Users/stefano.formicola/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.2
- iOS 16.2
- macOS 13.1
- tvOS 16.1
- watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9862592
Xcode:
version: 14.2/14C18
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.18
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/stefano.formicola/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 11.2.0
wanted: 11.2.0
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.71.7
wanted: ^0.71.0
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: true
newArchEnabled: false

Steps to reproduce

Init a new v0.71.7 project and add an Android productFlavor. Try to run-android specifying that app flavor through the --mode flag.

Snack, code example, screenshot, or link to a repository

N/A

@cortinico
Copy link
Contributor

Hi @ste7en
Thanks for reporting this issue.

It seems like this issue is actually unrelated to React Native core but related to the CLI. Please open this issue against this other repository:

https://github.com/react-native-community/cli/issues

I'll be closing this but feel free to reopen if the other repo points back to us as a issue in the core of React Native.

@cortinico cortinico added the Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library label Apr 26, 2023
@ste7en
Copy link
Author

ste7en commented Apr 26, 2023

Hey @cortinico thanks!

I don't think it's worth pointing the issue to the CLI repo as it has been fixed with v11.0.0 and react-native 0.72-stable already uses it.
However could be worth pointing its bump in #36697 in case of a future 0.71.8 release reactwg/react-native-releases#65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻CLI Needs: Triage 🔍 Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library
Projects
None yet
Development

No branches or pull requests

2 participants