-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.xml
112 lines (92 loc) · 3.97 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0"?>
<project name="AntPile v1.3.0 RC1" basedir="." default="full-build">
<!-- identify properties file -->
<property file="build.properties" />
<!-- Set up FlexUnit Ant tasks -->
<taskdef resource="flexUnitTasks.tasks" classpath="${lib.loc}/flexUnitTasks.jar" />
<!-- Add the ant-contrib tasks -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${lib.loc}/ant-contrib.jar" />
<import file="${includes.loc}/logging.xml" />
<import file="${includes.loc}/misc.xml" />
<import file="${includes.loc}/test.xml" />
<import file="${includes.loc}/asdoc.xml" />
<import file="${includes.loc}/package-air.xml" />
<import file="${includes.loc}/compile-swf.xml" />
<import file="${includes.loc}/compile-swc.xml" />
<import file="${includes.loc}/android.xml" />
<!--<import file="${includes.loc}/apparat.xml" />-->
<target name="startlog" depends="logging.start"/>
<target name="usage" depends="misc.usage" description="Prints usage message" />
<target name="test" depends="startlog" description="Runs unit tests and displays the report">
<log>start target test</log>
<runtarget target="test.run"/>
<log>end target test</log>
</target>
<target name="asdoc" depends="asdoc.gen" description="generates ASDoc"/>
<target name="compile" depends="startlog" description="Compiles the project as a swf">
<log>start target compile</log>
<!--check for compiler flag: normal compile vs apparat compile-->
<if>
<equals arg1="air" arg2="${compile.platform}" casesensitive="false" />
<then>
<echo>[compile] Compiling AIR</echo>
<runtarget target="compile-swf.compile" />
<runtarget target="package-air.package" />
</then>
<else>
<echo>[compile] Compiling SWF</echo>
<log message="Compile Build: Compiling SWF"/>
<runtarget target="compile-swf.compile" />
</else>
</if>
<log>end target compile</log>
</target>
<target name="run" description="Runs app">
<if>
<equals arg1="air" arg2="${compile.platform}" casesensitive="false" />
<then><!--<runtarget target="compile-air.local-run" />--></then>
<else><runtarget target="compile-swf.local-run" /></else>
</if>
</target>
<target name="full-build" description="Runs tests, compiles project, and optionally runs it.">
<if>
<istrue value="${run.test}"/>
<then>
<log message="Full Build: Running Unit Tests"/>
<runtarget target="test" />
</then>
</if>
<if>
<istrue value="${run.asdoc}"/>
<then>
<log message="Full Build: Generating ASDocs"/>
<runtarget target="asdoc" />
</then>
</if>
<if>
<istrue value="${mobile}"/>
<then>
<runtarget target="deploy-to-phone" />
</then>
<else>
<runtarget target="compile" />
</else>
</if>
<if>
<istrue value="${autolaunch.url}"/>
<then><runtarget target="run"/></then>
</if>
</target>
<target name="compile-swc" description="Compiles project as swc" depends="compile-swc.compile" />
<target name="deploy-lib" description="Prepares swf lib and moves it to deploy directory" depends="compile-swc.deploy"/>
<target name="package" depends="startlog" description="Packages up project as air app">
<log>start target package-apk</log>
<echo message="${compile.platform}"/>
<echo message="${mobile}"/>
<runtarget target="compile"/>
<runtarget target="package-air.package" />
<log>end target package-apk</log>
</target>
<target name="deploy-to-emulator" depends="package,android.deploy-to-emulator" />
<target name="deploy-to-phone" depends="package,android.deploy-to-phone" />
</project>