Skip to content

Commit

Permalink
Merge pull request #15 from KarlosQ/master
Browse files Browse the repository at this point in the history
Use project-wide properties in sample
  • Loading branch information
Richou authored Jul 20, 2018
2 parents d62ca0d + 46e7dd8 commit 53ac46e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
18 changes: 12 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

buildscript {
repositories {
mavenCentral()
Expand All @@ -13,12 +17,12 @@ buildscript {
apply plugin: 'com.android.library'

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
compileSdkVersion safeExtGet('compileSdkVersion', 27)
buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3')

defaultConfig {
minSdkVersion 16
targetSdkVersion 27
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 27)
versionCode 3
versionName "1.2"
ndk {
Expand All @@ -30,8 +34,10 @@ android {
}
}


dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
api 'com.facebook.react:react-native:+'
api 'com.google.android.gms:play-services-location:15.0.1'
api "com.google.android.gms:play-services-location:${safeExtGet('googlePlayServicesVersion', '15.0.1')}"
}

8 changes: 8 additions & 0 deletions samples/LocationEnable/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@ allprojects {
google()
}
}
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 27
supportLibVersion = "27.1.1"
googlePlayServicesVersion = "15.0.1"
}

0 comments on commit 53ac46e

Please sign in to comment.