Skip to content

Instantly share code, notes, and snippets.

@drakestone
Last active December 23, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drakestone/6648373 to your computer and use it in GitHub Desktop.
Save drakestone/6648373 to your computer and use it in GitHub Desktop.
Ant 빌드시 company name 입력 받아서 빌드 코드에 반영하는 custom 빌드 스크립트
<?xml version="1.0" encoding="UTF-8"?>
<project name="Gee" default="help">
<target name="deploy" depends="clean">
<property file="build.properties" />
<property name="config-target-path" value="${source.dir}/com/example/gee"/>
<input message="Please input company name" addproperty="company" />
<!-- Copy the configuration file, replacing tokens in the file. -->
<copy file="config/Config.java" todir="${config-target-path}"
overwrite="true" encoding="utf-8">
<filterset>
<filter token="COMPANY" value="${company}"/>
</filterset>
</copy>
<xmlproperty file="AndroidManifest.xml"
prefix="themanifest"
collapseAttributes="true"/>
<property name="out.final.file"
location="${out.absolute.dir}/${ant.project.name}-${themanifest.manifest.android:versionName}-${company}.apk" />
<antcall target="release" />
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment