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

[android] Refine and test the findLibraryName function #1635

Conversation

cortinico
Copy link
Member

Summary:

Here I'm extending the findLibraryName function to do the following:

  1. Account for codegenConfig.name in the package.json in the root (if available)
  2. Handle both single and double quotes in build.gradle files
  3. Handle libraries using build.gradle.kts files.

This implements the remaining points listed here facebook/react-native#33777 (comment)

Test Plan:

I've wrote a small test suite for findLibraryName as it was empty.


if (match) {
return match[1];
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for else when we return

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I follow up on this in a separate PR?

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@thymikee thymikee merged commit 148d317 into react-native-community:main Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants