-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
64 lines (52 loc) · 1.91 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="utf-8"?>
<project name="Tour de Mobile Flex">
<property file="build.properties"/>
<taskdef name="mxmlc" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" classname="flex.ant.MxmlcTask"/>
<property name="out.dir" value="out/release"/>
<target name="compile">
<mkdir dir="${out.dir}"/>
<mxmlc file="src/TourDeMobileFlex.mxml" output="${out.dir}/TourDeMobileFlex.swf"
optimize="true" configname="airmobile" debug="false">
<source-path path-element="src"/>
</mxmlc>
</target>
<target name="createHtmlSamples">
<mkdir dir="${out.dir}/codesamples"/>
<exec executable="/usr/bin/php">
<arg value="codeHighlight.php"/>
<arg value="--sourcedir=src/samples"/>
<arg value="--outputdir=${out.dir}/codesamples"/>
</exec>
</target>
<target name="prepackage">
<copy todir="${out.dir}/icons">
<fileset dir="src/icons"/>
</copy>
</target>
<target name="package-apk" depends="compile,createHtmlSamples,prepackage">
<copy file="src/TourDeMobileFlex-apk.xml" todir="${out.dir}"/>
<java jar="${FLEX_HOME}/lib/adt.jar" fork="true" failonerror="true" dir="${out.dir}">
<arg value="-package"/>
<arg value="-target"/>
<arg value="apk-debug"/>
<arg value="-storetype"/>
<arg value="${STORETYPE}"/>
<arg value="-keystore"/>
<arg value="${KEYSTORE}"/>
<arg value="-storepass"/>
<arg value="${STOREPASS}"/>
<arg value="TourDeMobileFlex.apk"/>
<arg value="TourDeMobileFlex-apk.xml"/>
<arg value="TourDeMobileFlex.swf"/>
<arg value="icons"/>
<arg value="codesamples"/>
</java>
</target>
<target name="install-apk" depends="package-apk">
<exec executable="${ANDROID_HOME}/tools/adb">
<arg value="install"/>
<arg value="-r"/>
<arg value="${out.dir}/TourDeMobileFlex.apk"/>
</exec>
</target>
</project>