I’m trying to configure autoincrement of version number in an Android aplication.
I’ve configured Ant tasks which make a checkout of the file then autoincrement the string with version value and then automatically do check-in in TFS system. So this test.properties file has this contetnt:
versionCode="1"
Autoincrement did this task:
<propertyfile file="${basedir}/src/test.properties">
<entry key="versionCode" value="1" type="int" operation="+" />
</propertyfile>
How would I configure replacement of the value of this string: android:versionCode=”1″, located in the target file androidmanifest.xml?
I suppose you can use the
ReplaceRegExptask in Ant:It might look something like this:
The
build.numberproperty could be obtained by reading in the property file before running this task.