Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26821] CLI: Use <version> for the "android:versionCode" attribute

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelscb-tooling
ReporterHans Knöchel
AssigneeUnknown
Created2019-02-12T21:18:03.000+0000
Updated2020-01-30T23:09:27.000+0000

Description

The tag of the tiapp.xml can be used to bump build versions in production builds on iOS and it works great. Unfortunately, right now, Android still always needs to update the android:versionCode attribute of the <application> node everytime. It would be great if the build could auto-bump it for production builds as well.

Comments

  1. Joshua Quick 2019-02-12

    Currently, Titanium is already assigning the "tiapp.xml" <version/> string to the Android app's "versionName" attribute within the "AndroidManifest.xml". But the problem with the Android "versionCode" is that it only supports a single integer. Android apps do not support the typical "major.minor.build" versioning scheme. Only a single integer is supported. So, it's up to the app developer to decide how to handle it. Note that a common handling of the "versionCode" integer is to treat it as a *fixed-point* type. For example, you can spec it out on your end that the least 2 significant digits in the integer (ie: the 2 right most digits) are decimal so that integer value 100 should be regarded as 1.0. That is, the formula would be: floatVersion = versionCode / 100.0 (I don't recommend that you turn the version into a literal float since you would run into precision issues.) Just note that since there are no rules and every app developer handles "versionCode" differently, we can't really doing anything automatic for app developers because whatever scheme we dictate may not line-up with their own scheme.

JSON Source