mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
added dynamic dependencies on buildTools compileSdk and targetSdk versions
This commit is contained in:
@@ -2,13 +2,40 @@ def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
|
|||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
|
def computeCompuleSdkVersion () {
|
||||||
|
if(project.hasProperty("compileSdk")) {
|
||||||
|
return compileSdk
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 23
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def computeBuildToolsVersion() {
|
||||||
|
if(project.hasProperty("buildToolsVersion")) {
|
||||||
|
return buildToolsVersion
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return "22.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def computeTargetSdkVersion() {
|
||||||
|
if(project.hasProperty("targetSdk")) {
|
||||||
|
return targetSdk
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 23
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion computeCompuleSdkVersion()
|
||||||
buildToolsVersion "23.0.2"
|
buildToolsVersion computeBuildToolsVersion()
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 17
|
minSdkVersion 17
|
||||||
targetSdkVersion 23
|
targetSdkVersion computeTargetSdkVersion()
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user