This repository has been archived by the owner on Jan 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
97 lines (82 loc) · 3.32 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
<?xml version="1.0"?>
<!--
Build swc and test it against unit tests.
@usage $ ant -DFLEX_HOME <path-to-flex-sdk> -DFLEXUNIT <path-to-flexunit-ant-tasks> -DFLASHPLAYER <path-to-flash-player-debugger>
@author Jan Břečka
-->
<project name="project" default="main" basedir=".">
<target name="main" depends="clean, compile, test, asdoc"/>
<property name="FLEX_HOME" value="D:/sdks/flex/4.6.0"/>
<property name="FLEXUNIT" value="D:/sdks/flexunit"/>
<property name="FLASHPLAYER" value="D:/sdks/flex/4.6.0/runtimes/player/11.4/win/FlashPlayerDebugger.exe"/>
<property name="project.dir" value="${basedir}/async-gif-decoder"/>
<property name="tests.dir" value="${basedir}/test"/>
<property name="BUILD.dir" value="${basedir}/build"/>
<property name="ASDOC.dir" value="${basedir}/asdoc-output"/>
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<taskdef resource="flexUnitTasks.tasks">
<classpath>
<fileset dir="${FLEXUNIT}">
<include name="flexUnitTasks*.jar"/>
</fileset>
</classpath>
</taskdef>
<target name="clean">
<delete dir="${BUILD.dir}"/>
<mkdir dir="${BUILD.dir}"/>
<delete dir="${ASDOC.dir}"/>
<mkdir dir="${ASDOC.dir}"/>
</target>
<target name="compile">
<compc output="${BUILD.dir}/async-gif-decoder.swc" failonerror="true"
debug="false"
warnings="true"
optimize="true"
maxmemory="1024m">
<source-path path-element="${project.dir}/src"/>
<include-sources dir="${project.dir}/src" includes="*"/>
</compc>
</target>
<target name="test">
<mxmlc file="${tests.dir}/src/test.as" failonerror="true"
output="${tests.dir}/bin-debug/test.swf"
verbose-stacktraces="true"
static-link-runtime-shared-libraries="true">
<library-path dir="${tests.dir}/libs"
includes="*"
append="true"/>
<library-path dir="${FLEX_HOME}"
append="true">
<include name="frameworks/libs"/>
</library-path>
<library-path file="${BUILD.dir}/async-gif-decoder.swc" append="true"/>
</mxmlc>
<flexunit swf="${tests.dir}/bin-debug/test.swf"
toDir="${BUILD.dir}"
haltonfailure="false"
failureproperty="flexunit.failure"
verbose="true"
localTrusted="true"
command="${FLASHPLAYER}"
display="99"/>
<junitreport todir="${BUILD.dir}">
<fileset dir="${BUILD.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames"
todir="${BUILD.dir}/html"/>
</junitreport>
<fail if="flexunit.failure" message="FlexUnit test(s) failed."/>
</target>
<target name="asdoc">
<delete dir="${ASDOC.dir}"/>
<asdoc output="${ASDOC.dir}" failonerror="true"
lenient="true"
main-title="Async GIF decoder | API documentation"
window-title="Async GIF decoder | API documentation"
left-frameset-width="340"
warnings="false">
<doc-sources path-element="${project.dir}/src"/>
</asdoc>
</target>
</project>