mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 12:03:28 +08:00
CB-8976: Added the cdvVersionCodeForceAbiDigit
flag to the template build.gradle that appends 0 to the versionCode when cdvBuildMultipleApks
is not set
This commit is contained in:
parent
2b53c98cf5
commit
940439866e
@ -70,6 +70,10 @@ ext {
|
|||||||
if (!project.hasProperty('cdvBuildMultipleApks')) {
|
if (!project.hasProperty('cdvBuildMultipleApks')) {
|
||||||
cdvBuildMultipleApks = null
|
cdvBuildMultipleApks = null
|
||||||
}
|
}
|
||||||
|
// Whether to append a 0 "abi digit" to versionCode when only a single APK is build
|
||||||
|
if (!project.hasProperty('cdvVersionCodeForceAbiDigit')) {
|
||||||
|
cdvVersionCodeForceAbiDigit = null
|
||||||
|
}
|
||||||
// .properties files to use for release signing.
|
// .properties files to use for release signing.
|
||||||
if (!project.hasProperty('cdvReleaseSigningPropertiesFile')) {
|
if (!project.hasProperty('cdvReleaseSigningPropertiesFile')) {
|
||||||
cdvReleaseSigningPropertiesFile = null
|
cdvReleaseSigningPropertiesFile = null
|
||||||
@ -111,6 +115,7 @@ if (ext.cdvReleaseSigningPropertiesFile == null && file('release-signing.propert
|
|||||||
|
|
||||||
// Cast to appropriate types.
|
// Cast to appropriate types.
|
||||||
ext.cdvBuildMultipleApks = cdvBuildMultipleApks == null ? false : cdvBuildMultipleApks.toBoolean();
|
ext.cdvBuildMultipleApks = cdvBuildMultipleApks == null ? false : cdvBuildMultipleApks.toBoolean();
|
||||||
|
ext.cdvVersionCodeForceAbiDigit = cdvVersionCodeForceAbiDigit == null ? false : cdvVersionCodeForceAbiDigit.toBoolean();
|
||||||
ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? null : Integer.parseInt('' + cdvMinSdkVersion)
|
ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? null : Integer.parseInt('' + cdvMinSdkVersion)
|
||||||
ext.cdvVersionCode = cdvVersionCode == null ? null : Integer.parseInt('' + cdvVersionCode)
|
ext.cdvVersionCode = cdvVersionCode == null ? null : Integer.parseInt('' + cdvVersionCode)
|
||||||
|
|
||||||
@ -138,6 +143,7 @@ task cdvPrintProps << {
|
|||||||
println('cdvCompileSdkVersion=' + cdvCompileSdkVersion)
|
println('cdvCompileSdkVersion=' + cdvCompileSdkVersion)
|
||||||
println('cdvBuildToolsVersion=' + cdvBuildToolsVersion)
|
println('cdvBuildToolsVersion=' + cdvBuildToolsVersion)
|
||||||
println('cdvVersionCode=' + cdvVersionCode)
|
println('cdvVersionCode=' + cdvVersionCode)
|
||||||
|
println('cdvVersionCodeForceAbiDigit=' + cdvVersionCodeForceAbiDigit)
|
||||||
println('cdvMinSdkVersion=' + cdvMinSdkVersion)
|
println('cdvMinSdkVersion=' + cdvMinSdkVersion)
|
||||||
println('cdvBuildMultipleApks=' + cdvBuildMultipleApks)
|
println('cdvBuildMultipleApks=' + cdvBuildMultipleApks)
|
||||||
println('cdvReleaseSigningPropertiesFile=' + cdvReleaseSigningPropertiesFile)
|
println('cdvReleaseSigningPropertiesFile=' + cdvReleaseSigningPropertiesFile)
|
||||||
@ -199,6 +205,11 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (Boolean.valueOf(cdvVersionCodeForceAbiDigit)) {
|
||||||
|
// This provides compatibility to the default logic for versionCode before cordova-android 5.2.0
|
||||||
|
defaultConfig {
|
||||||
|
versionCode defaultConfig.versionCode*10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user