Skip to content

Instantly share code, notes, and snippets.

@illuzor illuzor/build.xml
Created Aug 16, 2015

Embed
What would you like to do?
<project name="AntBuildDemo" default="build.all" basedir="..">
<property file="build/build.config"/>
<property name="asc2.compiler" value="${flex.home}/lib/mxmlc-cli.jar"/>
<property name="adt" value="${flex.home}/lib/adt.jar"/>
<property name="air.config" value="${flex.home}/frameworks/airmobile-config.xml"/>
<property name="flex.config" value="${flex.home}/frameworks/flex-config.xml"/>
<target name="build.all" depends="compile.for.player, build.for.android, build.for.ios" description="Making all builds" />
<target name="build.for.android" depends="-compile.for.android, -make.android.apk" description="Building android apk" />
<target name="build.for.ios" depends="-compile.for.ios, -make.ios.ipa" description="Building ios ipa" />
<target name="compile.for.player" description="Compiling swf for flashplayer">
<java jar="${asc2.compiler}" failonerror="true" fork="true">
<arg value="-load-config+=${flex.config}"/>
<arg value="-load-config+=${compile.config}"/>
<arg value="-debug=${debug.build}"/>
<arg value="-swf-version=29"/>
<arg value="-define=CONFIG::flashplayer,true"/>
<arg value="-define=CONFIG::android,false"/>
<arg value="-define=CONFIG::ios,false"/>
</java>
<move file="src/com/illuzor/antbuilddemo/Main.swf" tofile="${release.folder}/SWF_for_player.swf"/>
</target>
<target name="-compile.for.android" description="Compiling swf for android">
<java jar="${asc2.compiler}" failonerror="true" fork="true">
<arg value="-load-config+=${air.config}"/>
<arg value="-load-config+=${compile.config}"/>
<arg value="-debug=${debug.build}"/>
<arg value="+configname=airmobile"/>
<arg value="-swf-version=29"/>
<arg value="-define=CONFIG::flashplayer,false"/>
<arg value="-define=CONFIG::android,true"/>
<arg value="-define=CONFIG::ios,false"/>
</java>
<move file="src/com/illuzor/antbuilddemo/Main.swf" tofile="bin/AntBuildDemo.swf"/>
</target>
<target name="-make.android.apk" description="Making apk for android">
<echo message="Starting build android armv7 apk"/>
<java jar="${adt}" failonerror="true" fork="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="apk-captive-runtime"/>
<arg value="-arch"/>
<arg value="armv7"/>
<arg value="-storetype"/>
<arg value="pkcs12"/>
<arg value="-keystore"/>
<arg value="${android.cert}"/>
<arg value="-storepass"/>
<arg value="${android.cert.pass}"/>
<arg value="${release.folder}/android_armv7.apk"/>
<arg value="application.xml"/>
<arg value="-C"/>
<arg value="bin"/>
<arg value="."/>
<arg value="-C"/>
<arg value="icons/android"/>
<arg value="."/>
</java>
<echo message="Starting build android x86 apk"/>
<java jar="${adt}" failonerror="true" fork="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="apk-captive-runtime"/>
<arg value="-arch"/>
<arg value="x86"/>
<arg value="-storetype"/>
<arg value="pkcs12"/>
<arg value="-keystore"/>
<arg value="${android.cert}"/>
<arg value="-storepass"/>
<arg value="${android.cert.pass}"/>
<arg value="${release.folder}/android_x86.apk"/>
<arg value="application.xml"/>
<arg value="-C"/>
<arg value="bin"/>
<arg value="."/>
<arg value="-C"/>
<arg value="icons/android"/>
<arg value="."/>
</java>
</target>
<target name="-compile.for.ios" description="Compiling swf for ios">
<java jar="${asc2.compiler}" failonerror="true" fork="true">
<arg value="-load-config+=${air.config}"/>
<arg value="-load-config+=${compile.config}"/>
<arg value="-debug=${debug.build}"/>
<arg value="+configname=airmobile"/>
<arg value="-swf-version=29"/>
<arg value="-define=CONFIG::flashplayer,false"/>
<arg value="-define=CONFIG::android,false"/>
<arg value="-define=CONFIG::ios,true"/>
</java>
<move file="src/com/illuzor/antbuilddemo/Main.swf" tofile="bin/AntBuildDemo.swf"/>
</target>
<target name="-make.ios.ipa" description="Making ipa for ios">
<echo message="Starting build ios ipa"/>
<java jar="${adt}" failonerror="true" fork="true">
<arg value="-package"/>
<arg value="-target"/>
<arg value="${ios.build.type}"/>
<arg value="-storetype"/>
<arg value="pkcs12"/>
<arg value="-keystore"/>
<arg value="${ios.cert}"/>
<arg value="-storepass"/>
<arg value="${ios.cert.pass}"/>
<arg value="-provisioning-profile"/>
<arg value="${ios.provision}"/>
<arg value="${release.folder}/ios_fasttest.apk"/>
<arg value="application.xml"/>
<arg value="-C"/>
<arg value="bin"/>
<arg value="."/>
<arg value="-C"/>
<arg value="icons/ios"/>
<arg value="."/>
</java>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.