mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 03:53:09 +08:00
replace Integer.parseInt with BigInteger so that you can use longer Android version codes
I used to have DNS like version codes (YYYYmmmddXX format) for my apps builds, and I can't go back in older apps because Google Play wont allow me to upload inferior version codes, so I thing we should to use BigInteger instead of Integer.parseInt This closes #298
This commit is contained in:
parent
d2a159d2dc
commit
23fd0982b0
@ -164,7 +164,7 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode"))
|
||||
versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode"))
|
||||
applicationId privateHelpers.extractStringFromManifest("package")
|
||||
|
||||
if (cdvMinSdkVersion != null) {
|
||||
|
@ -125,7 +125,7 @@ def doExtractIntFromManifest(name) {
|
||||
def pattern = Pattern.compile(name + "=\"(\\d+)\"")
|
||||
def matcher = pattern.matcher(manifestFile.getText())
|
||||
matcher.find()
|
||||
return Integer.parseInt(matcher.group(1))
|
||||
return new BigInteger(matcher.group(1))
|
||||
}
|
||||
|
||||
def doExtractStringFromManifest(name) {
|
||||
|
Loading…
Reference in New Issue
Block a user