Skip to content

Skip lint check for dynamic react-native version#26222

Closed
friederbluemle wants to merge 1 commit into
facebook:masterfrom
friederbluemle:prevent-lint-warning
Closed

Skip lint check for dynamic react-native version#26222
friederbluemle wants to merge 1 commit into
facebook:masterfrom
friederbluemle:prevent-lint-warning

Conversation

@friederbluemle
Copy link
Copy Markdown
Contributor

@friederbluemle friederbluemle commented Aug 28, 2019

Summary

The dependencies section in the build.gradle Android template contains this line:

implementation "com.facebook.react:react-native:+"  // From node_modules

It causes the following Gradle Lint warning:

Avoid using '+' in version numbers, can lead to unpredictable or unrepeatable builds

In this case, as the // From node_modules comment suggests, the version is not determined by Gradle but by the version specified in package.json - Using "+" is completely fine and intentional.

Therefore it can safely be ignored, which is what the added //noinspection does.

Changelog

[Android] [Fixed] - Skip lint check for dynamic react-native version

Test Plan

Projects generated with the new template no longer cause the warning.

This prevents a Gradle lint warning about the version of the
react-native dependency from node_modules.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 28, 2019
@react-native-bot react-native-bot added Bug Platform: Android Android applications. labels Aug 28, 2019
@osdnk
Copy link
Copy Markdown
Contributor

osdnk commented Aug 28, 2019

Thanks! Makes sense!

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@osdnk has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Contributor

@mdvacca mdvacca left a comment

Choose a reason for hiding this comment

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

Accepting and Landing it

Copy link
Copy Markdown
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Somehow didn't land, will retry.

@osdnk
Copy link
Copy Markdown
Contributor

osdnk commented Sep 9, 2019

yayyy! it passed

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @friederbluemle in 87f94d5.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 9, 2019
@friederbluemle friederbluemle deleted the prevent-lint-warning branch September 9, 2019 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: Android Android applications.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants