Skip to content

Commit 3a1519d

Browse files
committed
Allow configurable Android SDK versions from root project to support newer builds
1 parent d45f3bc commit 3a1519d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

android/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
apply plugin: 'com.android.library'
22

3+
def DEFAULT_COMPILE_SDK_VERSION = 23
4+
def DEFAULT_BUILD_TOOLS_VERSION = "23.0.1"
5+
def DEFAULT_TARGET_SDK_VERSION = 22
6+
37
android {
4-
compileSdkVersion 23
5-
buildToolsVersion "23.0.1"
8+
compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
9+
buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
610

711
defaultConfig {
812
minSdkVersion 16
9-
targetSdkVersion 22
13+
targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
1014
versionCode 1
1115
versionName "1.0"
1216
}

0 commit comments

Comments
 (0)