Skip to content

Conversation

@simonbengtsson
Copy link

Makes sure a recent version of react native is used by specifying that at least version 0.49 should be used for Android. Otherwise an old 0.20.1 version hosted in jcenter might override the version included from node_modules.

Motivation

Ending up with an ancient version of react native might be confusing to new users trying out react native for the first time.

Test Plan

NA

Release Notes

[DOCS] [MINOR] [IntegrationWithExistingApps.md] - Make sure a node_modules version of react native is used

Make sure a recent version of react native is used by default. Otherwise an old 0.20.1 version hosted in [jcenter](https://bintray.com/bintray/jcenter/com.facebook.react%3Areact-native) might override the version included from `node_modules`.
@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@pull-bot
Copy link

pull-bot commented Oct 28, 2017

Messages
📖

📄 Docs - Thanks for your contribution to the docs!

@facebook-github-bot label Documentation

Attention: @hramos

Generated by 🚫 dangerJS

@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 Oct 28, 2017
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@hramos
Copy link
Contributor

hramos commented Nov 7, 2017

Can you tell us a bit more about why such an old version may be used? If we can fix that, it'd be ideal. I don't want to have to update this doc every time we release a new version (0.49 will be considered too old at some point).

@simonbengtsson
Copy link
Author

simonbengtsson commented Nov 9, 2017

If react native is added after jcenter() in a gradle file it will use a 0.20.1 version hosted by the Facebook organization there. My guess is that jcenter() was used for distribution before npm?

This gradle file would install 0.20.1 of react native:

repositories {
    jcenter() // Included in default android projects
    maven {
        url "$rootDir/../node_modules/react-native/android"
    }
}

But maybe it is a bad idea to mention a specific version even if it has the greater than tag. How about changing the gradle section to this? I.e specifically mentioning jcenter in a comment and moving "..." below the npm react native repository?

allprojects {
    repositories {
        maven {
            // All of React Native (JS, Android binaries) is installed from npm
            url "$rootDir/node_modules/react-native/android"
        }
        ... // Other maven repositories such as `jcenter()` goes here
    }
    ...
}

Revert version constraint and instead add note about where jcenter() goes.
@hramos
Copy link
Contributor

hramos commented Dec 8, 2017

Thanks for the contribution. The docs have moved to their own repo at facebook/react-native-website. I've applied your change over there.

@hramos hramos closed this Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants