Skip to content

Commit a73e510

Browse files
committed
Fix Android gradle build script
1 parent 4285234 commit a73e510

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

android/build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
def safeExtGet(prop, fallback) {
2+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
3+
}
14

25
apply plugin: 'com.android.library'
36

47
android {
5-
compileSdkVersion 23
6-
buildToolsVersion "23.0.1"
8+
compileSdkVersion safeExtGet('compileSdkVersion', 26)
9+
buildToolsVersion safeExtGet('buildToolsVersion', '26.0.3')
710

811
defaultConfig {
9-
minSdkVersion 16
10-
targetSdkVersion 22
12+
minSdkVersion safeExtGet('minSdkVersion', 16)
13+
targetSdkVersion safeExtGet('targetSdkVersion', 26)
1114
versionCode 1
1215
versionName "1.0"
1316
ndk {

0 commit comments

Comments
 (0)