fix: Use custom app name when getting build.gradle
Summary:
It cannot access package name from build.gradle when the module is named differently than app. This PR is fixing it.
Closes #2516
Test Plan:
- Init fresh project
- Change
android/appfolder name toandroid/test - Create
react-native.config.jsfile with the following content:
module.exports = {
project: {
android: {
appName: 'test',
},
},
};
- Run
androidcommand and verify the error about missing package name is not thrown
Checklist
- [x] Documentation is up to date to reflect these changes.
- [x] Follows commit message convention described in CONTRIBUTING.md
3. Create
react-native.config.jsfile with the following content:
Is this documented somewhere or is it a new config?
Is this documented somewhere or is it a new config?
If you mean the property appName -- yes it was added a while ago and it's document here.
Is this documented somewhere or is it a new config?
If you mean the property
appName-- yes it was added a while ago and it's document here.
yup that one 👍 thank you
Let's fix CI failures and it's good to go for me!
Ah, because of recent package refactors there are some merge conflicts 🥲 @TMisiukiewicz can you take a look? :pray:
@TMisiukiewicz let’s rebase this and we’re good to go :)
There hasn't been any activity on this pull request 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.