Commit 5c56c7aa authored by Libin Lu's avatar Libin Lu Committed by GitHub

Merge pull request #859 from yangtaufoo/master

A better fix for Google Play Services taking project properties
parents f88ef15b 8335eeb6
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
def DEFAULT_COMPILE_SDK_VERSION = 25
def DEFAULT_BUILD_TOOLS_VERSION = "25.0.2"
def DEFAULT_TARGET_SDK_VERSION = 25
def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION = "11.+"
android { android {
compileSdkVersion 25 compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
buildToolsVersion "25.0.2" buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 25 targetSdkVersion project.hasProperty('buildToolsVetargetSdkVersionrsion') ? project.buildToolsVersion : DEFAULT_TARGET_SDK_VERSION
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
} }
...@@ -17,10 +22,12 @@ repositories { ...@@ -17,10 +22,12 @@ repositories {
} }
dependencies { dependencies {
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION
compile fileTree(include: ['*.jar'], dir: 'libs') compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:+' compile 'com.facebook.react:react-native:+'
compile 'com.google.firebase:firebase-core:+' compile "com.google.firebase:firebase-core:$googlePlayServicesVersion"
compile 'com.google.firebase:firebase-messaging:+' compile "com.google.firebase:firebase-messaging:$googlePlayServicesVersion"
compile 'me.leolin:ShortcutBadger:1.1.17@aar' compile 'me.leolin:ShortcutBadger:1.1.17@aar'
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment