Skip to content

Using SDK Version variables from root project - #714

Merged
oblador merged 3 commits into
oblador:masterfrom
rayronvictor:master
Jul 20, 2018
Merged

oblador merged 3 commits into
oblador:masterfrom
rayronvictor:master

Conversation

@rayronvictor

Copy link
Copy Markdown
Contributor

Instead of assuming the compileSdkVersion, targetSdkVersion, etc, read it from the root project.
Default compileSdkVersion and targetSdkVersion to the latest versions.

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
And the React Native team is already working on this:
react/react-native#17741
react/react-native#18095

Instead of assuming the `compileSdkVersion`, `targetSdkVersion`, etc, read it from the root project.
Default `compileSdkVersion` and `targetSdkVersion` to the latest versions.

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
And the React Native team is already working on this:
react/react-native#17741
react/react-native#18095
@oblador

oblador commented May 30, 2018

Copy link
Copy Markdown
Owner

Thanks! Would you mind documenting this too?

Comment thread android/build.gradle Outdated

apply plugin: 'com.android.library'

def _ext = rootProject.ext

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why the _ prefix for all variables, can you rename the variables to something more sensible?

Comment thread android/build.gradle Outdated

def _ext = rootProject.ext

def _reactNativeVersion = _ext.has('reactNative') ? _ext.reactNative : '+'

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Wouldn't it make sense to have the setting be named reactNativeVersion for consistency?

@alexismoreau

alexismoreau commented Jun 19, 2018 •

Copy link
Copy Markdown

It works well, maybe you should use implementation instead of compile to avoid the deprecated warning.
Thanks !

@oblador oblador left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Renamed variables for consistency, otherwise LGTM!

@oblador
oblador merged commit cfb58ca into oblador:master Jul 20, 2018
@jeaye

jeaye commented Jul 20, 2018

Copy link
Copy Markdown

I came here to also fork and make a PR for this. Thanks for beating me to it! Can we get a new release, please?

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.

4 participants