Since the app.version property app.version always changing, I assume that you do not want to hard-code it into property files, but rather pass it when you build. In addition to this answer , you can try the following on the command line:
ant -f build.xml -Dapp.version=1.2.0
change app.version to required.
Edit:
I better understood your question from the feedback. Unfortunately ant has no string manipulation tasks, you need to write your own task . The following is an example.
source share