diff --git a/android/build.gradle b/android/build.gradle index beafef4f..1383db5e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,16 @@ +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + apply plugin: 'com.android.library' android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion safeExtGet('compileSdkVersion', 23) + buildToolsVersion safeExtGet('buildToolsVersion', "23.0.1") defaultConfig { - minSdkVersion 16 - targetSdkVersion 22 + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 22) versionCode 1 versionName "1.0" ndk { @@ -16,6 +20,6 @@ android { } dependencies { - compile 'com.android.support:appcompat-v7:23.0.0' - compile 'com.facebook.react:react-native:0.19.+' + implementation "com.android.support:appcompat-v7:${safeExtGet('supportLibVersion', '23.0.0')}" + implementation "com.facebook.react:react-native:+" } \ No newline at end of file