I use TeamCity to build android projects.
Android takes build number and version info from AndroidManifest.xml file, which looks like
<?xml version="1.0" encoding="utf-8"?>
where android:versionCode is the build number and android:versionName is visible version (e.g. 4.5.1). Android projects are built with ant.
What I want is full (forward and backward) integration for build numbers, i.e. TeamCity read build number from manifest, use it, increment, update file and commit it to svn.
What is the best and most correct way to do it? A couple of special ant tasks?