cli icon indicating copy to clipboard operation
cli copied to clipboard

fix: Use custom app name when getting build.gradle

Open TMisiukiewicz opened this issue 1 year ago • 4 comments

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:

  1. Init fresh project
  2. Change android/app folder name to android/test
  3. Create react-native.config.js file with the following content:
module.exports = {
  project: {
    android: {
      appName: 'test',
    },
  },
};
  1. Run android command 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

TMisiukiewicz avatar Oct 10 '24 14:10 TMisiukiewicz

3. Create react-native.config.js file with the following content:

Is this documented somewhere or is it a new config?

cortinico avatar Oct 10 '24 14:10 cortinico

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.

szymonrybczak avatar Oct 10 '24 14:10 szymonrybczak

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

cortinico avatar Oct 10 '24 15:10 cortinico

Let's fix CI failures and it's good to go for me!

szymonrybczak avatar Oct 11 '24 09:10 szymonrybczak

Ah, because of recent package refactors there are some merge conflicts 🥲 @TMisiukiewicz can you take a look? :pray:

szymonrybczak avatar Nov 12 '24 07:11 szymonrybczak

@TMisiukiewicz let’s rebase this and we’re good to go :)

thymikee avatar Dec 30 '24 11:12 thymikee

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.

github-actions[bot] avatar Mar 31 '25 03:03 github-actions[bot]