Skip to content

Commit

Permalink
Pull info from app build.gradle if available
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-griffin committed Jun 25, 2019
1 parent 1da9f1a commit 8b2fb0a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 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 {
jcenter()
Expand All @@ -11,12 +15,12 @@ buildscript {
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
safeExtGet('compileSdkVersion', 23)
safeExtGet('buildToolsVersion', '23.0.1')

defaultConfig {
minSdkVersion 16
targetSdkVersion 22
safeExtGet('minSdkVersion', 16)
safeExtGet('targetSdkVersion', 22)
versionCode 1
versionName "0.2.0"
}
Expand All @@ -40,5 +44,5 @@ repositories {
}

dependencies {
compile 'com.facebook.react:react-native:+'
implementation 'com.facebook.react:react-native:+'
}

0 comments on commit 8b2fb0a

Please sign in to comment.