diff --git a/android/build.gradle b/android/build.gradle index 261655d..6f3937f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,13 +11,17 @@ buildscript { apply plugin: 'com.android.library' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + android { - compileSdkVersion 23 - buildToolsVersion '27.0.3' + compileSdkVersion safeExtGet('compileSdkVersion', 23) + buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3') defaultConfig { - minSdkVersion 16 - targetSdkVersion 22 + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 22) versionCode 1 versionName "1.0" } @@ -34,4 +38,4 @@ dependencies { compile 'com.facebook.react:react-native:+' compile 'com.aliyun.dpa:oss-android-sdk:+' } - \ No newline at end of file +