-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Using SDK Version variables from root project #714
Conversation
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: facebook/react-native#17741 facebook/react-native#18095
Thanks! Would you mind documenting this too? |
android/build.gradle
Outdated
@@ -10,13 +10,21 @@ buildscript { | |||
|
|||
apply plugin: 'com.android.library' | |||
|
|||
def _ext = rootProject.ext |
There was a problem hiding this comment.
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?
android/build.gradle
Outdated
@@ -10,13 +10,21 @@ buildscript { | |||
|
|||
apply plugin: 'com.android.library' | |||
|
|||
def _ext = rootProject.ext | |||
|
|||
def _reactNativeVersion = _ext.has('reactNative') ? _ext.reactNative : '+' |
There was a problem hiding this comment.
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?
It works well, maybe you should use implementation instead of compile to avoid the deprecated warning. |
There was a problem hiding this comment.
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!
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? |
Instead of assuming the
compileSdkVersion
,targetSdkVersion
, etc, read it from the root project.Default
compileSdkVersion
andtargetSdkVersion
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:
facebook/react-native#17741
facebook/react-native#18095