react-native-community / cli

The React Native Community CLI - command line tools to help you build RN apps
MIT License
2.4k stars 904 forks source link

Correct way to support multiple appFolders #1292

Closed kyleclegg closed 1 year ago

kyleclegg commented 4 years ago

Per the documentation here one should no longer use appFolder. In our codebase we support two building to different apps/targets, so we do not want to set a single one in react-native.config.js. What's the best way to support multiple?

My standard flow is to run either of the following commands:

I am met with the following warning: warn Using deprecated "--appFolder" flag. Use "project.android.appName" in react-native.config.js instead.

Thanks for any feedback.

grabbou commented 3 years ago

This might be interesting case to solve. Can you drop me a gist of your folder structure to better understand how to reproduce this with Gradle and play around?

thymikee commented 3 years ago

Maybe we could rename --appFolder to --appName, does that make sense? Regardless, you can always run your command with e.g. ENV_APP=app1 env var and in RN config read it from process.env.MY_ENV.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.