is there a way to auto-increment the version code each time you build an Android application in Eclipse?
According to http://developer.android.com/guide/publishing/v
Receipe:
To automatically have the android:versionCode attribute of manifest element in AndroidManifest.xml set to the current time (from epoch in seconds, obtained from unix shell) everytime you run a build, add this to your -pre-build target in custom_rules.xml Android file.
Confirmation Test:
Obtain the versionCode attribute of the generated apk file, using the following shell command from your Android project directory :
$ANDROID_SDK/build-tools/20.0.0/aapt dump badging bin/.apk | grep versionCode
and compare it to the current date returned from the shell command: date +%s
The difference should equal the period of time in seconds between the two confirmation steps above.
Advantages of this approach: