cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject android commit: replace Integer.parseInt with BigInteger so that you can use longer Android version codes
Date Mon, 12 Sep 2016 17:40:03 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/master d2a159d2d -> 23fd0982b


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


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/23fd0982
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/23fd0982
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/23fd0982

Branch: refs/heads/master
Commit: 23fd0982b0faa6b7e169c2946eab07930f1f4d16
Parents: d2a159d
Author: Pierre-Alexis de Solminihac <pa@quai13.com>
Authored: Fri Apr 22 19:10:49 2016 +0200
Committer: Joe Bowser <bowserj@apache.org>
Committed: Mon Sep 12 10:39:34 2016 -0700

----------------------------------------------------------------------
 bin/templates/project/build.gradle | 2 +-
 framework/cordova.gradle           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/23fd0982/bin/templates/project/build.gradle
----------------------------------------------------------------------
diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle
index 0aad300..0ec49a9 100644
--- a/bin/templates/project/build.gradle
+++ b/bin/templates/project/build.gradle
@@ -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) {

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/23fd0982/framework/cordova.gradle
----------------------------------------------------------------------
diff --git a/framework/cordova.gradle b/framework/cordova.gradle
index 746b63a..21a01bb 100644
--- a/framework/cordova.gradle
+++ b/framework/cordova.gradle
@@ -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) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message