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: be able to read more complex buildToolsVersion definitions #2531

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dloic
Copy link

@dloic dloic commented Oct 16, 2024

Summary:

As highlighted in #2221, the way some projects (like expo ones) define the buildToolsVersion is breaking react-native doctor.

buildscript {
    ext {
        buildToolsVersion = findProperty('android.buildToolsVersion') ?: '34.0.0'
        minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '23')
   ...

leads to buildToolsVersion => .b34.0.0.

The PR is slightly tweaking the parsing to account for those cases.

Test Plan:

  • A new test has been added to demonstrate code is now able to properly read the buildToolsVersion
  • Existing tests are already covering the basic buildToolsVersion = "a version" syntax

Checklist

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

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.

1 participant