cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lasse (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8976) platforms/android/build.gradle modifies android versionCode
Date Tue, 15 Dec 2015 16:47:46 GMT

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

Lasse commented on CB-8976:
---------------------------

It would be preferable if Cordova did not by default define an arbitrary version numbering
scheme.

In the documentation there are no hints at these changes to the version code:
https://cordova.apache.org/docs/en/5.4.0/config_ref/index.html
{quote}
Below is an example that *explicitly* sets these properties:
    <widget id="io.cordova.hellocordova"
      version="0.0.1"
      android-versionCode="7"
{quote}

For others running in to this issue:

One way to actually set the version code is to also define it in gradle.properties. Add the
line {{cdvVersionCode=7}} to the file {{gradle.properties}} and place it in {{platforms/android/gradle.properties}}.

> 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


Mime
View raw message