title: Auto increment version code in Android app
body: <p>is there a way to auto-increment the version code each time you build an Android application in Eclipse?</p>
  
  <p>According to <a href="http://developer.android.com/guide/publishing/versioning.html">http://developer.android.com/guide/publishing/versioning.html</a>, you have to manually increment your version code in <code>AndroidManifest.xml</code>.</p>
  
  <p>I understand, you have to run a script before each build which would, e.g. parse AndroidManifest.xml file, find the version number, increment it and save the file before the build itself starts. However, i couldn't find out how and if Eclipse supports runnings scripts before/after builds.</p>
  
  <p>I have found <a href="http://www.ibm.com/developerworks/opensource/tutorials/os-eclipse-tools/section2.html">this article</a> about configuring ant builder, but this is not exactly about Android and I fear this will mess up too much the predefined building steps for Android?</p>
  
  <p>Should be a common problem, how did you solve it?</p>
  
  <p>Well, one can do this manually, but as soon as you forget to do this chore, you get different versions with the same number and the whole versioning makes little sense.</p>