This repository has been archived by the owner on Jun 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
90 lines (77 loc) · 3.52 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="flexRpcStubs" basedir="." default="package">
<property environment="env" />
<!-- Version info -->
<property file="${basedir}/version.properties" />
<!-- Existing -->
<property name="src.loc" location="${basedir}/src/main/flex" />
<property name="test.loc" location="${basedir}/src/test/flex" />
<property name="lib.loc" location="${basedir}/libs" />
<property name="lib.build.loc" location="${basedir}/libs/build" />
<!-- Generated -->
<property name="dist.loc" location="${basedir}/target" />
<property name="bin.loc" location="${basedir}/target/bin" />
<property name="doc.loc" location="${basedir}/target/docs" />
<property name="report.loc" location="${basedir}/target/report" />
<!-- Setup Flex Ant Resources -->
<property name="FLEX_HOME" location="${env.FLEX_HOME}" />
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<target name="clean">
<delete dir="${dist.loc}" failonerror="false" />
</target>
<target name="init">
<mkdir dir="${dist.loc}" />
<mkdir dir="${bin.loc}" />
<mkdir dir="${doc.loc}" />
<mkdir dir="${report.loc}" />
</target>
<target name="compile" depends="init">
<compc output="${bin.loc}/${build.finalName}">
<include-sources dir="${src.loc}" includes="*" append="true" />
<source-path path-element="${src.loc}" />
<compiler.external-library-path dir="${lib.loc}" append="true">
<include name="*.swc" />
</compiler.external-library-path>
<compiler.external-library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
<include name="flex.swc" />
<include name="framework.swc" />
<include name="rpc.swc" />
<include name="utilities.swc" />
</compiler.external-library-path>
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
<compiler.headless-server>true</compiler.headless-server>
</compc>
</target>
<target name="test" depends="compile">
<taskdef resource="flexUnitTasks.tasks" classpath="${lib.build.loc}/flexUnitTasks.jar" />
<mxmlc file="${test.loc}/TestRunner.mxml" output="${bin.loc}/TestRunner.swf">
<library-path dir="${lib.loc}" append="true">
<include name="*.swc" />
</library-path>
<library-path dir="${bin.loc}" append="true">
<include name="${build.finalName}" />
</library-path>
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
<compiler.headless-server>true</compiler.headless-server>
</mxmlc>
<flexunit swf="${bin.loc}/TestRunner.swf" toDir="${report.loc}" haltonfailure="false" verbose="true" />
</target>
<target name="report" depends="test">
<junitreport todir="${report.loc}">
<fileset dir="${report.loc}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${report.loc}/html" />
</junitreport>
<java jar="${FLEX_HOME}/lib/asdoc.jar" fork="true" failonerror="true">
<arg line="+flexlib '${FLEX_HOME}/frameworks'" />
<arg line="-doc-sources '${src.loc}'" />
<arg line="-source-path+='${src.loc}'" />
<arg line="-output '${doc.loc}'" />
<arg line="-library-path+='${lib.loc}'" />
</java>
</target>
<target name="package" depends="report">
<copy file="${bin.loc}/${build.finalName}" todir="${dist.loc}" />
</target>
</project>