cli
cli copied to clipboard
Why remove Android custom root?
So i've been trying to create a multi-repo setup with independent native layers. We have a complex project that involves writing a lot of native code. So we've decided to separate our layers, make RN UI optional for testing purposes, hire some native developers, etc.
What i've discovered is that there's no way as of now to specify custom RN project location when Android project is outside of the RN project directory hierarchy. I've poked around for a bit and found lots of articles (pre-2017) describing how to achieve that. There's also leftovers of this functionality in RN CLI code.
My question is "Why remove it?". Just code some sensible fallback behaviour if custom root is not provided, what's the harm in keeping it?
Here's the PR that breaks it all, specifically the offending native_modules.gradle script (i've yet to try the same thing with iOS)
https://github.com/react-native-community/cli/commit/5724d29dc979a4b645c620109348a1e5c8c74d03#diff-ecaf5036fcf6d813561bfae9327d5f8d6d83f42ebf9d867359e3efb5d6e3b1bc
No comments, no discussion, just casually nuking quite a useful tool. I now have to jump through all the hoops and loops of either building your package locally or releasing my own fork on NPM just to do something so trivial
Anything preventing you to use project.android.sourceDir as documented here: https://github.com/react-native-community/cli/blob/main/docs/projects.md in your react-native.config.js?
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.