mirror of
https://github.com/apache/cordova-android.git
synced 2025-05-14 15:35:11 +08:00
Android - allow changing min sdk version (#1117)
* try to allow changing min sdk version * undo testing with cdvMinSdkVersion=21 * Update framework/build.gradle No printing of default behaviour Co-authored-by: Norman Breau <norman@nbsolutions.ca> * Update framework/build.gradle typo + match case of cdvMinSdkVersion Co-authored-by: Norman Breau <norman@nbsolutions.ca> * resolve PR feedback timbru Co-authored-by: Norman Breau <norman@nbsolutions.ca>
This commit is contained in:
parent
671e1fd1c6
commit
d5b9029a23
@ -20,6 +20,12 @@ ext {
|
|||||||
apply from: 'cordova.gradle'
|
apply from: 'cordova.gradle'
|
||||||
cdvCompileSdkVersion = privateHelpers.getProjectTarget()
|
cdvCompileSdkVersion = privateHelpers.getProjectTarget()
|
||||||
cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
|
cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
|
||||||
|
if (project.hasProperty('cdvMinSdkVersion') && cdvMinSdkVersion.isInteger()) {
|
||||||
|
cdvMinSdkVersion = cdvMinSdkVersion as int
|
||||||
|
println '[Cordova] cdvMinSdkVersion is overridden, try it at your own risk.'
|
||||||
|
} else {
|
||||||
|
cdvMinSdkVersion = 22; // current Cordova's default
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
@ -60,9 +66,9 @@ android {
|
|||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
// For the Android Cordova Lib, we will hardcode the minSdkVersion and not allow changes.
|
// For the Android Cordova Lib, we allow changing the minSdkVersion, but it is at the users own risk
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 22
|
minSdkVersion cdvMinSdkVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
@ -141,7 +147,7 @@ bintray {
|
|||||||
labels = ['android', 'cordova', 'phonegap']
|
labels = ['android', 'cordova', 'phonegap']
|
||||||
version {
|
version {
|
||||||
name = '9.1.0-dev'
|
name = '9.1.0-dev'
|
||||||
released = new Date()
|
released = new Date()
|
||||||
vcsTag = '9.1.0-dev'
|
vcsTag = '9.1.0-dev'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user