forked from videojuicer/stylekit-as3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
old.xml
212 lines (179 loc) · 8.83 KB
/
old.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<?xml version="1.0" encoding="utf-8"?>
<project name="stylekit-as3" default="test" basedir=".">
<property environment="env" />
<property name="instrument.metadata" value="flexunit-instrument.cvm" />
<property name="instrument.report.flexcover" value="flexunit-instrument.cvr" />
<property name="instrument.report.cobertura" value="coverage.xml" />
<property name="main.src.loc" location="${basedir}/src/main" />
<property name="test.src.loc" location="${basedir}/src/test" />
<property name="example.src.loc" location="${basedir}/src/example" />
<property name="lib.loc" location="${basedir}/libs" />
<property name="util.loc" location="${lib.loc}/utilkit-as3" />
<property name="util.src.loc" location="${lib.loc}/utilkit-as3/src/main" />
<property name="output.loc" location="${basedir}/target" />
<property name="bin.loc" location="${output.loc}/bin" />
<property name="dist.loc" location="${output.loc}/dist" />
<property name="util.edge.loc" location="${basedir}/../utilkit-as3" />
<property name="util.edge.src.loc" location="${basedir}/../utilkit-as3/src/main" />
<property name="as3crypto.loc" location="${basedir}/libs/as3crypto" />
<property name="as3crypto.src.loc" location="${basedir}/libs/as3crypto/src" />
<property name="report.loc" location="${output.loc}/report" />
<property name="report.asdocs.loc" location="${report.loc}/asdocs" />
<property name="report.flexcover.loc" location="${report.loc}/flexcover" />
<property name="report.unit.loc" location="${report.loc}/unit" />
<property name="FLEX_HOME" location="${env.FLEX_HOME}" />
<property name="FLEX_COVER_VIEWER" location="${env.FLEX_COVER_VIEWER}" />
<property name="FLEX_HEADLESS" value="${env.FLEX_HEADLESS}" />
<property name="FLASH_HEADLESS" value="${env.FLASH_HEADLESS}" />
<condition property="FLEX_HEADLESS" value="${FLEX_HEADLESS}" else="false">
<isset property="FLEX_HEADLESS" />
</condition>
<condition property="FLASH_HEADLESS" value="${FLASH_HEADLESS}" else="false">
<isset property="FLASH_HEADLESS" />
</condition>
<echo>FLEX_HOME: ${FLEX_HOME}</echo>
<echo>FLEX_HEADLESS: ${FLEX_HEADLESS}</echo>
<echo>FLASH_HEADLESS: ${FLASH_HEADLESS}</echo>
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<taskdef resource="flexUnitTasks.tasks" classpath="${lib.loc}/flexUnitTasks-4.1.0_RC2-4.jar" />
<target name="usage" description="Displays main targets of the build recipe">
<java classname="org.apache.tools.ant.Main">
<arg value="-projecthelp" />
</java>
</target>
<target name="clean" description="Cleans the generated build files from the target">
<!-- when running the tests from flex builder, this file is created -->
<delete file="${main.src.loc}/FlexUnitApplication.mxml" />
<!-- delete flex builder builds -->
<delete dir="${basedir}/bin" />
<delete dir="${output.loc}" />
</target>
<target name="init" depends="clean">
<mkdir dir="${output.loc}" />
<mkdir dir="${bin.loc}" />
<mkdir dir="${report.loc}" />
<mkdir dir="${report.flexcover.loc}" />
<mkdir dir="${report.asdocs.loc}" />
<mkdir dir="${report.unit.loc}" />
<mkdir dir="${dist.loc}" />
</target>
<target name="compile" depends="init,up" description="Compiles the main StyleKit-as3 SWC">
<compc output="${bin.loc}/stylekit-as3.swc" fork="false">
<source-path path-element="${main.src.loc}" />
<source-path path-element="${util.src.loc}" />
<source-path path-element="${as3crypto.src.loc}" />
<include-sources dir="${main.src.loc}" includes="*" />
<include-sources dir="${util.src.loc}" includes="*" />
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
<compiler.headless-server>true</compiler.headless-server>
</compc>
</target>
<target name="test-compile" description="Compiles the nessary SWF's for running the test specs">
<mxmlc file="${test.src.loc}/SpecRunner.mxml" output="${bin.loc}/stylekit-as3-specs.swf">
<source-path path-element="${main.src.loc}" />
<source-path path-element="${test.src.loc}" />
<source-path path-element="${util.src.loc}" />
<source-path path-element="${as3crypto.src.loc}" />
<library-path dir="${lib.loc}" append="true">
<include name="flexunit-4.1.0_RC2-4-as3_4.1.0.16076.swc" />
<include name="flexunit-cilistener-4.1.0_RC2-4-4.1.0.16076.swc" />
<!--<include name="flexunit-flexcoverlistener-4.1.0.53-sdk4.0.0.14159.swc" />-->
</library-path>
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
<compiler.headless-server>true</compiler.headless-server>
</mxmlc>
</target>
<target name="update" depends="fetch-crypto" description="Updates the StyleKit local repo and the submodules contained within">
<exec executable="git" spawn="false" dir="${basedir}">
<arg line="pull --rebase" />
</exec>
<exec executable="git" spawn="false" dir="${util.loc}">
<arg line="pull origin master" />
</exec>
</target>
<target name="fetch-crypto" description="Fetches the AS3 Crypto from subversion and exports into libs/">
<exec executable="svn" spawn="false" dir="${basedir}">
<arg line="export --force" />
<arg line="http://as3crypto.googlecode.com/svn/trunk/as3crypto/" />
<arg line="${as3crypto.loc}" />
</exec>
</target>
<target name="setup" description="Sets up the StyleKit local repo and the submodules contained within">
<exec executable="git" spawn="false" dir="${basedir}">
<arg line="pull --rebase" />
</exec>
<exec executable="git" spawn="false">
<arg line="submodule init" />
</exec>
<exec executable="git" spawn="false">
<arg line="submodule update" />
</exec>
</target>
<target name="up" depends="update" description="Alias for update" />
<target name="example" depends="compile" description="Compiles the example using the StyleKit-as3 library">
<mxmlc file="${example.src.loc}/StyleKitPlayer.as" output="${bin.loc}/stylekit-as3-example.swf" static-link-runtime-shared-libraries="true">
<source-path path-element="${example.src.loc}" />
<library-path dir="${bin.loc}" append="true">
<include name="stylekit-as3.swc" />
</library-path>
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
<compiler.headless-server>true</compiler.headless-server>
</mxmlc>
</target>
<target name="example-console" depends="compile" description="Compiles the example JS console using the StyleKit-as3 library">
<mxmlc file="${example.src.loc}/StyleKitConsole.as" output="${bin.loc}/stylekit-as3-example-console.swf" static-link-runtime-shared-libraries="true">
<source-path path-element="${example.src.loc}" />
<library-path dir="${bin.loc}" append="true">
<include name="stylekit-as3.swc" />
</library-path>
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
<compiler.headless-server>true</compiler.headless-server>
</mxmlc>
</target>
<target name="asdocs" description="Generates asdocs from the StyleKit-as3 source">
<delete file="${main.src.loc}/FlexUnitApplication.mxml" />
<asdoc output="${report.asdocs.loc}"
main-title="StyleKit-as3" window-title="StyleKit-as3"
failonerror="true" fork="true" keep-xml="true" skip-xsl="false">
<doc-sources path-element="${main.src.loc}" />
<compiler.source-path path-element="${main.src.loc}" />
<package-description-file>pkg-descriptions.xml</package-description-file>
<!-- <templates-path path-element="${tools.loc}/templates/asdocs" /> -->
</asdoc>
</target>
<target name="build">
<antcall target="clean" />
<antcall target="compile" />
<antcall target="test-only" />
<antcall target="example" />
<antcall target="asdocs" />
<antcall target="report" />
</target>
<target name="test" depends="compile,test-only,report" description="Builds and runs the test specs and generates reports" />
<target name="package" description="Package the StyleKit-as3 build into a distributable zip">
<copy file="${bin.loc}/stylekit-as3.swc" todir="${dist.loc}" />
<copy file="${bin.loc}/stylekit-as3-specs.swf" todir="${dist.loc}" />
<copy file="${bin.loc}/stylekit-as3-example.swf" todir="${dist.loc}" />
<copy file="${basedir}/README.markdown" todir="${dist.loc}" />
<copy todir="${dist.loc}/asdocs">
<fileset dir="${report.loc}/asdocs" />
</copy>
<zip destfile="${output.loc}/${ant.project.name}.zip">
<fileset dir="${dist.loc}" />
</zip>
</target>
<target name="test-only" depends="test-compile">
<flexunit swf="${bin.loc}/stylekit-as3-specs.swf" toDir="${report.unit.loc}"
haltonfailure="false" verbose="true" localTrusted="true" headless="${FLASH_HEADLESS}"
timeout="40000" />
<sleep seconds="10"/>
</target>
<target name="report" description="Generates HTML reports for the last ran test specs">
<junitreport todir="${report.unit.loc}">
<fileset dir="${report.unit.loc}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${report.unit.loc}/html" />
</junitreport>
</target>
</project>