-
Notifications
You must be signed in to change notification settings - Fork 682
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
A better fix for Google Play Services taking project properties #859
Conversation
android { | ||
compileSdkVersion 25 | ||
buildToolsVersion "25.0.2" | ||
compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION |
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.
I'm not familiar with gradle settings. curious here
- is project.hasProperty('compileSdkVersion') reading from main project so it is always defined?
- what is "18.+" for? you previous change was "11.+"
project.hasProperty(*) is reading the optional variables from the file android/build.gradle. As it is optional, the user might not define it. As a fail safe when users do not define the variables, the default variables are there to make sure that compilation works. I’ve made an error with the Google Play Services version. It should be 11.+ instead of 18.+ |
android/build.gradle
Outdated
@@ -1,12 +1,17 @@ | |||
apply plugin: 'com.android.library' | |||
|
|||
def DEFAULT_COMPILE_SDK_VERSION = 26 |
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.
can you change it back to 25? inline with react-native default
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.
Alright, I will do it. Any other requests?
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.
that's it
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.
Done, thanks @evollu for reviewing in such short notice. Might want to update the readme to have a section where users can define their own Google Play Services version as per outlined in Android documentation (https://developer.android.com/studio/build/gradle-tips.html#configure-project-wide-properties)
An better extension of #858!