diff --git a/android/build.gradle b/android/build.gradle index 5aa582948..fd41c480a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,18 @@ apply plugin: 'com.android.library' +def DEFAULT_COMPILE_SDK_VERSION = 26 +def DEFAULT_TARGET_SDK_VERSION = 26 +def DEFAULT_BUILD_TOOLS_VERSION = '26.0.2' +def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION = '11.8.0' +def DEFAULT_FIREBASE_MESSAGING_VERSION = '11.8.0' + android { - compileSdkVersion 26 - buildToolsVersion '26.0.2' + compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION + buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION defaultConfig { minSdkVersion 16 - targetSdkVersion 26 + targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -23,12 +29,15 @@ android { } dependencies { + def firebaseVersion = project.hasProperty('firebaseVersion') ? project.firebaseVersion : DEFAULT_FIREBASE_MESSAGING_VERSION + def googlePlayServicesVersion = rootProject.hasProperty('googlePlayServicesVersion') ? rootProject.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION + compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.facebook.react:react-native:+' compile 'com.android.support:support-v4:26.1.0' compile 'com.android.support:appcompat-v7:26.1.0' - compile 'com.google.android.gms:play-services-wallet:11.8.0' - compile 'com.google.firebase:firebase-core:11.8.0' + compile "com.google.android.gms:play-services-wallet:$googlePlayServicesVersion" + compile "com.google.firebase:firebase-core:$firebaseVersion" compile 'com.stripe:stripe-android:6.0.0' compile 'com.github.tipsi:CreditCardEntry:1.4.8.10' } diff --git a/example/android/build.gradle b/example/android/build.gradle index 4993849a5..b76d2f387 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -34,3 +34,9 @@ allprojects { } } } + +ext { + buildToolsVersion = "26.0.2" + firebaseVersion = "11.8.0" + googlePlayServicesVersion = "11.8.0" +}