diff --git a/android/build.gradle b/android/build.gradle index 8f6ed7613a8cb052f45c59a929d7e19f9c7e0f37..ac9054bbf2056a4956963a9068a8a146638d21cf 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,17 @@ 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 { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION + buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION defaultConfig { minSdkVersion 16 - targetSdkVersion 25 + targetSdkVersion project.hasProperty('buildToolsVetargetSdkVersionrsion') ? project.buildToolsVersion : DEFAULT_TARGET_SDK_VERSION versionCode 1 versionName "1.0" } @@ -17,10 +22,12 @@ repositories { } dependencies { + def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION + compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.facebook.react:react-native:+' - compile 'com.google.firebase:firebase-core:+' - compile 'com.google.firebase:firebase-messaging:+' + compile "com.google.firebase:firebase-core:$googlePlayServicesVersion" + compile "com.google.firebase:firebase-messaging:$googlePlayServicesVersion" compile 'me.leolin:ShortcutBadger:1.1.17@aar' }