crosswalk-project/crosswalk — pull request #704 by wang16 (2013-09-18 06:22:42+00:00)
Title: [Android] Fill in the version field in Manifest when GYP

The version in AndroidManifest.xml has two parts:versionCode and versionName.
VersionCode is an increasing integer to identifing upgrade.
VersionName is a human readable string.

For xwalk, VERSION file should be the only place to maintain version.
So this patch removes the hard coding in AndroidManifest.xml.

Insteadly, two template files for manifest are created.
And when gyping, it will leverage chromium's version.py to replace the fields
with the actual number defined in VERSION file.

For versionCode, it's calculated through version.
The formula is:
versionCode = shift +
patch * 10 +
build * 1000 +
(major+minor) * 100000
Shift is the configuration bit. Currently, 1 for x86, 2 for armv7 and 3 for arm.