-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
122 lines (118 loc) · 5.1 KB
/
Copy pathbuild.xml
File metadata and controls
122 lines (118 loc) · 5.1 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<!--ant-->
<project name="AYYO Video Player" basedir="." default="compile">
<!-- set up a prefix for all environment variables -->
<property environment="env." />
<!-- load user properties to override defaults -->
<property file="user.properties" />
<!-- System environment must contain FLEX_HOME variable that points to Flex SDK -->
<property name="FLEX_HOME" location="${env.FLEX_HOME}" />
<!-- identify properties file -->
<property file="build.properties" />
<!-- Set up FlexUnit Ant tasks -->
<taskdef resource="flexUnitTasks.tasks" classpath="${lib.loc}/flexUnitTasks-4.1.0-8.jar" />
<target name="usage">
<echo message="" />
<echo message="AYYO Video Player Build Usage" />
<echo message="-----------------------------------" />
<echo message="" />
<echo message="Available targets are:" />
<echo message="" />
<echo message="compile --> Build player" />
<echo message="clean --> Remove all folders created by build script" />
<echo message="init --> Clean and create build folders" />
<echo message="" />
</target>
<!-- Clean Build and Report files -->
<target name="clean">
<!-- Remove all directories created during the build process -->
<echo>[clean] Removing Build, Report and Doc directories</echo>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${report.loc}" defaultexcludes="false">
<include name="**/*" />
</fileset>
<fileset dir="${dist.loc}" defaultexcludes="false">
<include name="**/*" />
</fileset>
<fileset dir="${doc.loc}" defaultexcludes="false">
<include name="**/*" />
</fileset>
</delete>
<echo>[clean] Build, Report and Doc directories removed</echo>
</target>
<!-- Create directories needed for the build process -->
<target name="init" depends="clean">
<echo>[init] Creating Bin, Report and Doc directories</echo>
<mkdir dir="${bin.loc}" />
<mkdir dir="${report.loc}" />
<mkdir dir="${doc.loc}" />
<echo>[init] Bin, Report and Doc directories created</echo>
</target>
<!-- Compile Release SWF -->
<target name="compile" depends="init">
<echo>[compile] Compiling release SWF</echo>
<echo>[compile] Using Flex SDK at: ${FLEX_HOME}</echo>
<java jar="${FLEX_HOME}/lib/mxmlc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
<arg value="${main.src.loc}/${main.package}/${project.name}.as" />
<arg value="-source-path=${main.src.loc}" />
<arg value="-output=${bin.loc}/${project.name.versioned}.swf" />
<arg value="-default-size=640,480" />
<arg value="-define=CONFIG::FLASH_10_1,true"/>
<arg value="-define=CONFIG::LOGGING,true"/>
<arg value="-default-background-color=0x000000" />
<arg value="-library-path+=${lib.loc}" />
<arg value="-incremental=true" />
<arg value="-verbose-stacktraces=true" />
<arg value="-headless-server=false" />
<arg value="-debug=${debug}" />
</java>
<echo>[compile] Release SWF ${project.name.versioned}.swf created successfully</echo>
</target>
<!-- -omit-trace-statements=true -->
<!-- Run Unit Tests -->
<target name="test" depends="init">
<echo>[test] Running Unit Tests</echo>
<!-- Compile TestRunner.as as a SWF -->
<java jar="${FLEX_HOME}/lib/mxmlc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
<arg value="${test.src.loc}/TestRunner.as" />
<arg value="-source-path=${main.src.loc}" />
<arg value="-output=${bin.loc}/TestRunner.swf" />
<arg value="-default-size=200,200" />
<arg value="-default-background-color=0x000000" />
<arg value="-library-path+=${lib.loc}" />
<arg value="-incremental=true" />
<arg value="-verbose-stacktraces=true" />
<arg value="-headless-server=false" />
<arg value="-debug=true" />
</java>
<!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
<flexunit swf="bin/TestRunner.swf" toDir="${report.loc}" haltonfailure="true" verbose="true" localTrusted="true" />
<!-- Generate readable JUnit-style reports -->
<junitreport todir="${report.loc}">
<fileset dir="${report.loc}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${report.loc}/html" />
</junitreport>
<echo>[test] Finished running Unit Tests</echo>
</target>
<!-- Build Documentation -->
<target name="asdoc" depends="init">
<echo>[asdoc] Generating ASDOC documentation</echo>
<tstamp>
<format property="docgen.time" pattern="MM/dd/yyyy hh:mm aa" unit="hour" />
</tstamp>
<java jar="${FLEX_HOME}/lib/asdoc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
<arg line="-external-library-path+='${lib.loc}'" />
<arg line="-doc-sources+='${main.src.loc}'" />
<arg line="-source-path+='${main.src.loc}'" />
<arg line="-output '${doc.loc}'" />
<arg value="-keep-xml=true" />
<arg value="-lenient=true" />
<arg line="-window-title 'AYYO Video Player ${player.ver.num}'" />
<arg line="-main-title 'AYYO Video Player ${player.ver.num}'" />
<arg line="-footer 'AYYO Video Player - http://www.ayyo.ru/ - Documentation generated at: ${docgen.time}'" />
</java>
<echo>[asdoc] ASDOC documentation generated successfully</echo>
</target>
</project>