Skip to content

Instantly share code, notes, and snippets.

@xian
Created December 6, 2010 19:38
Show Gist options
  • Save xian/730793 to your computer and use it in GitHub Desktop.
Save xian/730793 to your computer and use it in GitHub Desktop.
Android: include build number and date
<property environment="env"/>
<condition property="build.number" value="${env.BUILD_NUMBER}" else="unknown">
<isset property="env.BUILD_NUMBER"/>
</condition>
<exec command="date" outputproperty="build.date"/>
<target name="update-buildinfo">
<echo>updating build number and date to ${build.number} and ${build.date}</echo>
<echo file="res/values/buildinfo.xml"
>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;resources&gt;
&lt;string name="build_number"&gt;${build.number}&lt;/string&gt;
&lt;string name="build_date"&gt;${build.date}&lt;/string&gt;
&lt;/resources&gt;
</echo>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment