forked from google/liquidfun
-
Notifications
You must be signed in to change notification settings - Fork 1
/
assemble.xml
139 lines (137 loc) · 6.85 KB
/
assemble.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ =BEGIN MIT LICENSE
~
~ Copyright (c) 2014 Andras Csizmadia
~ http://www.vpmedia.hu
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
~
~ =END MIT LICENSE
-->
<project name="liquidfun.flash.assembler" default="build" basedir=".">
<!-- @usage: ant -f assemble.xml -->
<description>LiquidFun-Flash-Assembler</description>
<!-- ################################################################### -->
<!-- ########################### SETTINGS ############################## -->
<!-- ################################################################### -->
<property environment="env" />
<property name="AIR_SDK_HOME" value="${env.AIR_HOME}"/>
<property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
<property name="BUILD_DIR" value="bin"/>
<property name="REPORT_DIR" value="${BUILD_DIR}/reports"/>
<property name="ASDOC_DIR" value="${BUILD_DIR}/asdoc"/>
<!-- ################################################################### -->
<!-- ########################### TYPEDEFS ############################## -->
<!-- ################################################################### -->
<!-- FlexUnit -->
<!-- @see: http://docs.flexunit.org/index.php?title=Ant_Task -->
<taskdef resource="flexUnitTasks.tasks" onerror="report">
<classpath>
<fileset dir="src/test/libs">
<include name="flexUnitTasks-4.1.0-9.jar" />
</fileset>
</classpath>
</taskdef>
<!-- ASDoc -->
<taskdef resource="flexTasks.tasks" classpath="${env.FLEX_HOME}/ant/lib/flexTasks.jar" />
<!-- ################################################################### -->
<!-- ########################### TARGETS ############################### -->
<!-- ################################################################### -->
<!-- CLEAN PHASE -->
<target name="clean" description="Clean the build folders.">
<delete dir="${BUILD_DIR}" />
<mkdir dir="${BUILD_DIR}" />
<mkdir dir="${REPORT_DIR}" />
<mkdir dir="${ASDOC_DIR}" />
</target>
<!-- BUILD PHASE -->
<target name="build" depends="clean" description="Build the ActionScript sources.">
<!-- SWF -->
<java classname="com.adobe.flash.compiler.clients.MXMLC" fork="true" failonerror="true" dir="${basedir}" maxmemory="1024m">
<classpath>
<pathelement location="${AIR_SDK_HOME}/lib/compiler.jar"/>
</classpath>
<arg value="src/main/actionscript/TestBed.as" />
<arg line="-target-player=12.0" />
<arg line="-swf-version=23" />
<!--arg line="-debug=true" /-->
<!--arg line="-verbose-stacktraces=true" /-->
<arg line="-source-path+=./src/main/actionscript" />
<arg line="-library-path+=./LiquidFun.swc" />
<!--arg line="-dependency-graph=${REPORT_DIR}/mxmlc-graph.xml" /-->
<!--arg line="-link-report=${REPORT_DIR}/mxmlc-link-report.xml" /-->
<arg line="-size-report=${REPORT_DIR}/mxmlc-size-report.xml" />
<arg line="-dump-config=${REPORT_DIR}/mxmlc-dump-config.xml" />
<arg line="-load-config=${AIR_SDK_HOME}/frameworks/flex-config.xml" />
<arg line="-output=${BUILD_DIR}/TestBed.swf" />
</java>
<!-- APK -->
<java jar="${AIR_SDK_HOME}/lib/adt.jar" fork="true" failonerror="true" dir="${BUILD_DIR}/" maxmemory="1024m">
<arg value="-package" />
<arg value="-target" />
<arg value="apk-captive-runtime" />
<arg value="-keystore" />
<arg value="../src/main/embeds/LiquidFun.p12" />
<arg value="-storetype" />
<arg value="pkcs12" />
<arg value="-storepass" />
<arg value="LiquidFun" />
<arg value="TestBed" />
<arg value="../src/main/embeds/TestBed-app.xml" />
<arg value="TestBed.swf" />
<arg value="-C" />
<arg value="../src/main/assets" />
<arg value="icons" />
</java>
</target>
<!-- TEST PHASE -->
<target name="test" description="Test the ActionScript sources.">
<flexunit workingDir="${BUILD_DIR}" toDir="${REPORT_DIR}" haltonfailure="false" verbose="true" player="flash" headless="false" localTrusted="true">
<source dir="src/main/actionscript" />
<source dir="src/test/actionscript" />
<testSource dir="src/test/actionscript">
<include name="**/*Test.as" />
</testSource>
<library dir="src/test/libs/Common" />
<library dir="src/test/libs/ASProject" />
<library dir="./" />
</flexunit>
<junitreport todir="${REPORT_DIR}">
<fileset dir="${REPORT_DIR}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${REPORT_DIR}/html" />
</junitreport>
</target>
<!-- DOCUMENT PHASE -->
<target name="document" description="Generate ASDoc">
<asdoc output="${ASDOC_DIR}" lenient="true" failonerror="false">
<doc-sources path-element="${basedir}/src/main/actionscript" />
<compiler.source-path path-element="${basedir}/src/main/actionscript" />
<external-library-path dir="${env.FLEX_HOME}/frameworks/libs/air/" append="true">
<include name="*.swc" />
</external-library-path>
<external-library-path dir="${basedir}" append="true">
<include name="LiquidFun.swc" />
</external-library-path>
<!--define name="VERSION" value="1.0.0" /-->
</asdoc>
</target>
</project>