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

fix: delete com. prefix in package name #1915

Conversation

szymonrybczak
Copy link
Collaborator

@szymonrybczak szymonrybczak commented Apr 17, 2023

Summary:

This PR removes the addition of com. to the package name during project initialization.
Closes #1903

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js init ProjectName --package-name net.company.projectname
  1. Check two things:
  • net.company.projectname should be used as package name, without com. prefix
  • path android/app/src/debug/java/net/company/projectname should exsist.

@szymonrybczak szymonrybczak changed the title fix: delete default prefix in package name fix: delete com. prefix in package name Apr 17, 2023
@TMisiukiewicz
Copy link
Collaborator

I think we can totally remove getPackageNameDetails and just use the cleanPackageName value. We probably don't need all the rest of the values from this function anymore.

We also need to adjust createAndroidPackagePaths function because since we are operating on a template where we have android/app/src/main/java/com/app, right now it generates android/app/src/main/java/com/net/company/projectname 🤔

@TMisiukiewicz
Copy link
Collaborator

Just one small comment, except from that it works fine 👏

@szymonrybczak szymonrybczak force-pushed the fix/delete-default-prefix-in-package-name branch from eefa856 to 45a6bd2 Compare April 19, 2023 11:20
@szymonrybczak szymonrybczak force-pushed the fix/delete-default-prefix-in-package-name branch from bbc4b47 to b7bbb8f Compare April 19, 2023 11:24
@adamTrz adamTrz merged commit 69c033d into react-native-community:main Apr 21, 2023
thymikee pushed a commit that referenced this pull request May 4, 2023
* fix: delete default prefix in package name

* fix: code review improvements

* fix: tests

* test: add missing tests for `replaceNameInUTF8File`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--package-name option doesn't work properly
4 participants