-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
119 lines (106 loc) · 4.18 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
113
114
115
116
117
118
119
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2010-2011 Collab
Project build file.
-->
<project name="cabin" default="all" basedir=".">
<property file="${basedir}/build.properties" />
<xmlproperty file="${FLEX_HOME}/flex-sdk-description.xml" keepRoot="false"
prefix="flex"/>
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<taskdef resource="flexUnitTasks.tasks">
<classpath>
<fileset dir="${lib.path}">
<include name="flexUnitTasks*.jar" />
</fileset>
</classpath>
</taskdef>
<target name="build-environment">
<echo>${ant.version}</echo>
<echo>Java ${ant.java.version}</echo>
<echo>Flex ${flex.version}.${flex.build}</echo>
</target>
<target name="all" depends="clean" description="Build API docs, run tests and build SWC">
<antcall target="api-docs" />
<antcall target="build-lib" />
<antcall target="test" />
</target>
<target name="clean">
<delete dir="${basedir}/${app.outputfolder}" failOnError="false"
includeEmptyDirs="true"/>
<mkdir dir="${basedir}/${app.outputfolder}"/>
</target>
<target name="api-docs" description="Generate API documentation">
<echo>=========================</echo>
<echo>= API DOCUMENTATION =</echo>
<echo>=========================</echo>
<antcall target="build-environment" />
<delete dir="${basedir}/${app.outputfolder}/api" failOnError="false"
includeEmptyDirs="true"/>
<pathconvert property="asdoc.files" pathsep="," dirsep=".">
<fileset dir="src">
<include name="**/*.as"/>
</fileset>
<mapper>
<regexpmapper from="^.*(com.collab.cabin.*)\.(as)" to="\1" />
</mapper>
</pathconvert>
<exec executable="${asdoc.exe}" failonerror="true" dir="${app.src}">
<arg line="-load-config+=${basedir}/${app.config}"/>
<arg value="-load-config+=${basedir}/${docs.config}" />
<arg value="-load-config+=${basedir}/${def.config}" />
<arg value="-doc-classes=${asdoc.files}"/>
</exec>
</target>
<target name="build-lib" description="Build SWC library">
<echo>=====================</echo>
<echo>= BUILD LIBRARY =</echo>
<echo>=====================</echo>
<antcall target="build-environment" />
<exec executable="${compc.exe}" failonerror="true">
<arg line="-load-config+=${basedir}/${app.config}"/>
<arg value="-load-config+=${basedir}/${lib.config}" />
<arg value="-load-config+=${basedir}/${def.config}" />
<arg value="-external-library-path+=${lib.path}" />
</exec>
</target>
<target name="test" description="Run tests and publish reports">
<echo>==================</echo>
<echo>= UNIT TESTS =</echo>
<echo>==================</echo>
<antcall target="build-environment" />
<delete dir="${app.reports}" failOnError="false"
includeEmptyDirs="true"/>
<mkdir dir="${app.reports}" />
<flexunit workingDir="${app.reports}"
toDir="${app.reports}" haltonfailure="false"
command="${flashplayer.exe}"
localTrusted="true" verbose="false">
<source dir="${app.src}" />
<testSource dir="${app.tests}">
<include name="**/*Suite.as" />
</testSource>
<library dir="${lib.path}" />
</flexunit>
<junitreport todir="${app.reports}">
<fileset dir="${app.reports}">
<include name="TEST-*.xml" />
</fileset>
<report format="noframes" todir="${app.reports}/html">
<param name="TITLE" expression="Test results for Cabin ${lib.version}"/>
</report>
</junitreport>
<move file="${app.reports}/html/junit-noframes.html"
tofile="${app.reports}/html/index.html"/>
</target>
<target name="update-manifest" description="Update class manifest">
<echo>===================</echo>
<echo>= UPDATE MANIFEST =</echo>
<echo>===================</echo>
<exec executable="${manifest.exe}" failonerror="true">
<arg line="${app.src}"/>
<arg value="${lib.manifest}" />
<arg value="--excludes=fl" />
</exec>
</target>
</project>