TeamCity build number integration with xml file

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"?>
<manifest xmlns:android=""

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?

1 comment
Comment actions Permalink

Hello Ildar,

  You can obtain TeamCity's build number in your ant script via ${build.number} variable.
  You can pass custom build number to TeamCity server using service message, please see here.

  Hope this helps,


Please sign in to leave a comment.