You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Paul Weber (JIRA)" <ji...@apache.org> on 2015/10/05 17:10:28 UTC

[jira] [Comment Edited] (CB-8976) platforms/android/build.gradle modifies android versionCode

    [ https://issues.apache.org/jira/browse/CB-8976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14943494#comment-14943494 ] 

Paul Weber edited comment on CB-8976 at 10/5/15 3:09 PM:
---------------------------------------------------------

I tracked the issue down a little bit deeper, and it seems there is a property called cdvBuildMultipleApks that is set to a truthy value for some reason. And with that switch cordova begins messing with the version numbers (to be able to deploy all the versions at once of course, like google wants it, so it makes sense). 

What I did not find is where this switch is configured ... and especially the default value. I am not super fluent in groovy and gradle ...


was (Author: 000panther):
I tracked the issue down a little bit deeper, and it seems there is a property called cdvBuildMultipleApks that is set to a truthy value for some reason. And with that switch cordova begins messing with the version numbers (to be able to deploy all the versions at once of course, like google wants it). 

What I did not find is where this switch is configured ... and especially the default value. I am not super fluent in groovy and gradle ...

> platforms/android/build.gradle modifies android versionCode
> -----------------------------------------------------------
>
>                 Key: CB-8976
>                 URL: https://issues.apache.org/jira/browse/CB-8976
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>         Environment: Android
>            Reporter: zack dykes
>
> cordova 5.0.0
> platforms/android/build.gradle modifies android versionCode at ln 178
> as I understand it max size for versionCode is (2^31)-1 
> http://stackoverflow.com/a/24246191/126600
> in my config.xml: 
> {code}
> android-versionCode="1385039613"
> {code}
> when I run {{cordova build android}}, I get:
> {code}
> FAILURE: Build failed with an exception.
> * Where:
> Build file '/Users/zackd/dev/code/cordova/cordova-ansr-fat-client/ondeviceresearch/platforms/android/build.gradle' line: 178
> * What went wrong:
> A problem occurred evaluating root project 'android'.
> > For input string: "13850396130"
> {code}
> and build.gradle, ln 178
> {code}
> versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode") + "0")
> {code}
> looks like this is appending "0" to my versionCode, producing 13850396130 which is larger than max size for android versionCode
> if I mod ln 178 as follows, build succeeds
> {code}
> versionCode cdvVersionCode ?: Integer.parseInt("" + privateHelpers.extractIntFromManifest("versionCode"))
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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