Skip to content

Commit 8ad5dfb

Browse files
authored
Merge pull request #80 from Vydia/android-custom-build-props
Specify custom compileSdk, buildToolsVersion, and targetSdkVersion in project
2 parents 9bcf03c + 1d7e0ad commit 8ad5dfb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

android/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ buildscript {
99

1010
apply plugin: 'com.android.library'
1111

12+
def DEFAULT_COMPILE_SDK_VERSION = 25
13+
def DEFAULT_BUILD_TOOLS_VERSION = "25.0.2"
14+
def DEFAULT_TARGET_SDK_VERSION = 25
15+
1216
android {
13-
compileSdkVersion 25
14-
buildToolsVersion "25.0.2"
17+
compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
18+
buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION
1519

1620
defaultConfig {
1721
minSdkVersion 16
18-
targetSdkVersion 25
22+
targetSdkVersion project.hasProperty('targetSdkVersion') ? project.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
1923
versionCode 1
2024
versionName "1.0"
2125
ndk {

0 commit comments

Comments
 (0)