title: How to use Ant to auto renaming output apk file?
body: <p>I'm currently playing with Ant to do some auto branding work. I modified default build.xml and setup my own target. What I hope to ask is that is there a way in Ant Script that could automatic renaming the apk file just build with the certain name? </p>
  
  <p>I currently has this Ant target setup in my build.xml:</p>
  
  <pre><code>&lt;target name="release-brandA"
              depends="default, -set-release-mode, -release-obfuscation-check, -package, -post-package, -release-prompt-for-password, -release-nosign, -release-sign, -post-build"
              description="Builds the application in release mode for brandA."&gt;
      &lt;delete dir="${res}" /&gt;
      &lt;copydir dest="${res}" src="${branding}/brandA" forceoverwrite="ture" /&gt;
      &lt;replaceregexp flags="g" byline="false"&gt;
          &lt;regexp pattern="import com.arthur.android(.*).R;"/&gt;
          &lt;substitution expression="import com.arthur.android.brandA.R;"/&gt;
          &lt;fileset dir="src" includes="**/*.java" /&gt;
      &lt;/replaceregexp&gt;
      &lt;replaceregexp flags="g" byline="false"&gt;
          &lt;regexp pattern="package=&amp;quot;com.arthur.android(.*)&amp;quot;" /&gt;
          &lt;substitution expression="package=&amp;quot;com.arthur.android.brandA&amp;quot;" /&gt;
          &lt;fileset dir="" includes="AndroidManifest.xml" /&gt;
      &lt;/replaceregexp&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>Is there a way that I could add some more task, to let the output file just be like brandA.apk?</p>
  
  <p>Thank you!</p>