OSDN Git Service

Add --replace-version flag to aapt.
authorJeff Davidson <jpd@google.com>
Tue, 25 Feb 2014 20:28:08 +0000 (12:28 -0800)
committerJeff Davidson <jpd@google.com>
Tue, 25 Feb 2014 21:42:12 +0000 (13:42 -0800)
commitdf08d1c24dbbc242978ee33416d1e54998f88915
tree1f933fa448fcac027fb3b7bb0fc9cba1e273c510
parentc1970190549519acde6719c777f53611674058cb
Add --replace-version flag to aapt.

Motivation: we'd like to programmatically specify the version
name/code (i.e. to include the build number from the build server).
However, this means that we cannot specify version info in the
AndroidManifest.xml file, as this takes precedence. Not doing so makes
IDE use more difficult, as the IDE gets version code 0 and won't
install over an existing non-IDE version unless you first force a
downgrade to an IDE build from the command line.

This flag allows us to specify a very high version code in the
AndroidManifest.xml file, making IDE builds take precedence, while
still allowing us to override this info when performing command-line
(official) builds.

Change-Id: I5d01048698af5c26bdf19066c6cd4eca1115112a
tools/aapt/Bundle.h
tools/aapt/Main.cpp
tools/aapt/Resource.cpp