File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
22
3- def _ext = rootProject. ext
4-
5- def _compileSdkVersion = _ext. has(' compileSdkVersion' ) ? _ext. compileSdkVersion : 27
6- def _buildToolsVersion = _ext. has(' buildToolsVersion' ) ? _ext. buildToolsVersion : ' 27.0.3'
7- def _minSdkVersion = _ext. has(' minSdkVersion' ) ? _ext. minSdkVersion : 16
8- def _targetSdkVersion = _ext. has(' targetSdkVersion' ) ? _ext. targetSdkVersion : 27
3+ def safeExtGet (prop , fallback ) {
4+ rootProject. ext. has(prop) ? rootProject. ext. get(prop) : fallback
5+ }
96
107android {
11- compileSdkVersion _compileSdkVersion
12- buildToolsVersion _buildToolsVersion
8+ compileSdkVersion safeExtGet( ' compileSdkVersion ' , 23 )
9+ buildToolsVersion safeExtGet( ' buildToolsVersion ' , " 23.0.1 " )
1310
1411 defaultConfig {
15- minSdkVersion _minSdkVersion
16- targetSdkVersion _targetSdkVersion
12+ minSdkVersion safeExtGet( ' minSdkVersion ' , 16 )
13+ targetSdkVersion safeExtGet( ' targetSdkVersion ' , 22 )
1714 versionCode 1
1815 versionName " 1.0"
1916 }
You can’t perform that action at this time.
0 commit comments