-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
107 lines (82 loc) · 3.38 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
<?xml version="1.0"?>
<project name="HandBones" basedir="." default="build">
<!-- set up a prefix for all environment variables -->
<property environment="env." />
<!-- System environment must contain FLEX_HOME variable that points to Flex SDK -->
<property name="FLEX_HOME" location="${env.FLEX_HOME}" />
<!-- import the settings -->
<property file="${basedir}/build.properties" />
<!-- Check OS type -->
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isLinux">
<os family="unix" />
</condition>
<target name="initWindows" if="isWindows">
<property name="asdoc.app" value="${asdoc.win}" />
</target>
<target name="initUnix" if="isLinux">
<property name="asdoc.app" value="${asdoc.unix}" />
</target>
<target name="initOS" depends="initWindows, initUnix" />
<!-- Clean bin of old SWC's before compile -->
<target name="clean">
<echo>[clean] Removing previous SWC's from ${project.bin}</echo>
<delete>
<fileset dir="${project.bin}" includes="*.swc" />
</delete>
</target>
<!-- Compile Release SWC -->
<target name="compile" depends="clean">
<echo>[compile] Compiling release SWC</echo>
<echo>[compile] Using Flex SDK at: ${FLEX_HOME}</echo>
<java jar="${FLEX_HOME}/lib/compc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
<!-- Build our SWC with a versioned name. -->
<arg value="-output=${project.bin}/${project.name.versioned}.swc" />
<!-- We want all the org package classes in the SWC being built. -->
<arg value="-include-sources=${project.src}" />
<!-- Include classes from SWCs in this folder, but only the ones we use. -->
<arg value="-library-path+=${project.libs}" />
<!-- Keep the magic alive. -->
<arg value="-keep-as3-metadata+=Inject" />
<arg value="-keep-as3-metadata+=PostConstruct" />
<arg value="-keep-as3-metadata+=Event" />
<!-- Boolean mosh pit! -->
<arg value="-incremental=true" />
<arg value="-static-link-runtime-shared-libraries=true" />
<arg value="-verbose-stacktraces=true" />
<arg value="-headless-server=true" />
</java>
<echo>[compile] Removing cache file from ${project.bin}</echo>
<delete file="${project.bin}/${project.name.versioned}.swc.cache" />
<echo>[compile] Release SWC ${project.name.versioned}.swc created successfully</echo>
</target>
<target name="asdoc" depends="initOS">
<echo>[asdoc] Generating ASDOC documentation</echo>
<mkdir dir="${project.doc}" />
<!-- delete all files in the doc dir -->
<delete includeemptydirs="true">
<fileset dir="${project.doc}" includes="**/*" />
</delete>
<!-- create docs -->
<exec executable="${asdoc.app}">
<arg line=" -doc-sources '${project.src}'" />
<arg line=' -library-path ${project.libs}' />
<arg line=" -output '${project.doc}'" />
<arg line=" -main-title '${asdoc.mainTitle}'" />
<arg line=" -window-title '${asdoc.windowTitle}'" />
</exec>
<echo>[asdoc] Deleting old ASDoc zip</echo>
<delete>
<fileset dir="${project.bin}" includes="*.zip" />
</delete>
<echo>[asdoc] Zipping ${project.doc} folder to ${project.name.versioned}-ASDoc.zip</echo>
<zip destfile="${project.bin}/${project.name.versioned}-ASDoc.zip" basedir="${project.doc}" />
<echo>[asdoc] Deleting ${project.doc} folder</echo>
<delete dir="${project.doc}" />
</target>
<target name="build" depends="compile, asdoc" >
<echo>[build] COMPLETE</echo>
</target>
</project>