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: replacing package name in Kotlin template #2209

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

szymonrybczak
Copy link
Collaborator

Summary:

Closes #2205
CLI when replacing placeholders in init command is looking for return "HelloWorld", but during template's conversation from Java to Kotlin the function was simplified, and scripting for editing template doesn't see this anymore. So right now we need to look for =.

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 hello --package-name com.hello.hello
  1. Android app should compile and launch correctly.

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@szymonrybczak
Copy link
Collaborator Author

szymonrybczak commented Dec 15, 2023

Also I updated the fixtures, to align with current state of Java/Kotlin template.

@szymonrybczak szymonrybczak force-pushed the fix/replacing-package-name-rn-073 branch 2 times, most recently from e294d79 to 9d20955 Compare January 8, 2024 17:16
@szymonrybczak szymonrybczak force-pushed the fix/replacing-package-name-rn-073 branch 2 times, most recently from 929df71 to fd61479 Compare January 8, 2024 17:35
@szymonrybczak szymonrybczak force-pushed the fix/replacing-package-name-rn-073 branch 3 times, most recently from 60c3ea6 to 1127cce Compare January 9, 2024 18:09
@szymonrybczak szymonrybczak force-pushed the fix/replacing-package-name-rn-073 branch from 1127cce to 9d1a1c0 Compare January 9, 2024 18:17
@szymonrybczak szymonrybczak force-pushed the fix/replacing-package-name-rn-073 branch from c90052f to 847f5d6 Compare January 10, 2024 17:32
@thymikee thymikee merged commit 2561740 into main Jan 10, 2024
10 checks passed
@thymikee thymikee deleted the fix/replacing-package-name-rn-073 branch January 10, 2024 17:57
thymikee pushed a commit that referenced this pull request Jan 10, 2024
* fix: replacing name in Kotlin template

* fix(test): update snapshots

* test: update `contextLines`

* fix: use `utf-8` when reading files
thymikee added a commit that referenced this pull request Jan 12, 2024
* fix: replacing name in Kotlin template

* fix(test): update snapshots

* test: update `contextLines`

* fix: use `utf-8` when reading files

Co-authored-by: Szymon Rybczak <[email protected]>
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.

init with package-name specified creates Android project in a broken state
3 participants