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

build tools and sdk update #147

Merged
merged 4 commits into from
Jan 3, 2019
Merged

build tools and sdk update #147

merged 4 commits into from
Jan 3, 2019

Conversation

jasonalmaturner
Copy link
Contributor

Update the Android build tools and sdk to work with React Native 0.56.

@sadafk831
Copy link

@jasonalmaturner Thank you for the changes, would you mind making the build tools use the root project versions like following:

def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

compileSdkVersion safeExtGet('compileSdkVersion', 26)

@jasonalmaturner
Copy link
Contributor Author

Totally. That's a much better solution.


defaultConfig {
minSdkVersion 16
targetSdkVersion 23
targetSdkVersion 26
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I use safeExtGet for the targetSdkVersion as well?

Copy link

Choose a reason for hiding this comment

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

Yes, I have seen most of the react-native packages using this on buildToolsVersion and targetSdkVersion as well.

@skb1129
Copy link

skb1129 commented Sep 18, 2018

This is required to be released soon to work with RN 0.56


defaultConfig {
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion safeExtGet('compileSdkVersion', 26)
Copy link

Choose a reason for hiding this comment

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

Should this be safeExtGet('targetSdkVersion', 26)?

compileSdkVersion 25
buildToolsVersion "25.0.3"
compileSdkVersion safeExtGet('compileSdkVersion', 26)
buildToolsVersion safeExtGet('compileSdkVersion', "26.0.3")
Copy link

Choose a reason for hiding this comment

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

This one needs to be safeExtGet('buildToolsVersion', "26.0.3")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gosh. I'm dumb. Yes. I'll fix that right now.

@p1zzadog
Copy link

What's the timeline for this being merged and released? We need this for an upcoming release and I'd like to avoid forking this project.

@4ian
Copy link
Contributor

4ian commented Sep 21, 2018

@tychota @Minishlink @Almouro @AuroreM @chdeps @yleflour Anyone at BAM that could double check this PR and release it? I'm not working on a RN app right now so I have little time for this.

@Minishlink
Copy link
Contributor

Will try to look into this.

In the meantime you can still use the following in your root build.gradle

subprojects { subproject ->
    afterEvaluate{
        if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}

@jasonalmaturner
Copy link
Contributor Author

Any other changes need to be made to this pr before it's merged?

@Minishlink Minishlink merged commit 54e38bc into bamlab:master Jan 3, 2019
@jasonalmaturner jasonalmaturner deleted the rn-56 branch January 3, 2019 23:17
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.

7 participants