Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Respect project-level GMS version on Android (#350)
Browse files Browse the repository at this point in the history
* 🐛 Respect project-level gcm version on Android

* 🆕 Use the new android parameters in gradle config in example app
  • Loading branch information
Steel Brain authored and cybergrind committed Aug 8, 2018
1 parent 28b662b commit 2badc9f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
19 changes: 14 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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'
}
Expand Down
6 changes: 6 additions & 0 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ allprojects {
}
}
}

ext {
buildToolsVersion = "26.0.2"
firebaseVersion = "11.8.0"
googlePlayServicesVersion = "11.8.0"
}

0 comments on commit 2badc9f

Please sign in to comment.