File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1+ apply plugin : ' com.android.library'
12
23buildscript {
34 repositories {
@@ -9,15 +10,22 @@ buildscript {
910 }
1011}
1112
12- apply plugin : ' com.android.library'
13+ def safeExtGet (prop , fallback ) {
14+ rootProject. ext. has(prop) ? rootProject. ext. get(prop) : fallback
15+ }
16+
17+ def DEFAULT_COMPILE_SDK_VERSION = 23
18+ def DEFAULT_BUILD_TOOLS_VERSION = " 23.0.1"
19+ def DEFAULT_MIN_SDK_VERSION = 16
20+ def DEFAULT_TARGET_SDK_VERSION = 22
1321
1422android {
15- compileSdkVersion 23
16- buildToolsVersion " 23.0.1 "
23+ compileSdkVersion safeExtGet( ' compileSdkVersion ' , DEFAULT_COMPILE_SDK_VERSION )
24+ buildToolsVersion safeExtGet( ' buildToolsVersion ' , DEFAULT_BUILD_TOOLS_VERSION )
1725
1826 defaultConfig {
19- minSdkVersion 16
20- targetSdkVersion 22
27+ minSdkVersion safeExtGet( ' minSdkVersion ' , DEFAULT_MIN_SDK_VERSION )
28+ targetSdkVersion safeExtGet( ' targetSdkVersion ' , DEFAULT_TARGET_SDK_VERSION )
2129 versionCode 1
2230 versionName " 1.0"
2331 }
@@ -31,5 +39,5 @@ repositories {
3139}
3240
3341dependencies {
34- compile ' com.facebook.react:react-native:+'
42+ implementation ' com.facebook.react:react-native:+'
3543}
You can’t perform that action at this time.
0 commit comments