-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.xml
96 lines (86 loc) · 3.17 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
<?xml version="1.0"?>
<project name="as3amqp" basedir="." default="lib">
<!-- Define build timestamp -->
<tstamp>
<format property="build.time" pattern="hh:mm aa dd.MM.yyyy"/>
</tstamp>
<!-- Define variables/paths used in this build script -->
<property file="build.properties"/>
<!--
Have you edit the properties file to make sure the paths are right oo your system?
-->
<target name="properties">
<fail unless="asdoc">The "asdoc" property must be set in build.properties.</fail>
<fail unless="compc">The "compc" property must be set in build.properties.</fail>
</target>
<!--
Compile code generator
-->
<target name="codegen" depends="properties">
<mkdir dir="${build.dir}"/>
<copy todir="${build.dir}">
<fileset dir="codegen/specs"/>
<fileset dir="codegen/template"/>
</copy>
<javac srcdir="codegen/src" destdir="${build.dir}" failonerror="true">
<compilerarg value="-Xlint:all"/>
<classpath>
<fileset dir="codegen/lib">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
<java classname="org.amqp.as3.codegen.CodeGenerator" failonerror="true">
<classpath>
<pathelement path="${build.dir}"/>
<fileset dir="codegen/lib">
<include name="*.jar"/>
</fileset>
</classpath>
</java>
</target>
<!--
Compile all of the classes under the "src" tree into a .swc file
-->
<target name="lib" depends="codegen">
<java jar="${compc}" fork="true" failonerror="true">
<classpath>
<fileset dir="${flexsdk.dir}/lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
<jvmarg value="-Dapplication.home=${flexsdk.dir}"/>
<arg value="-sp=${src.dir}"/>
<arg value="-is=${src.dir}"/>
<arg value="-output=${bin.dir}/${library.name}.swc"/>
<arg value="-library-path+=${lib.dir}"/>
<arg value="-as3=true"/>
<arg value="-optimize=true"/>
<arg value="-warnings=true"/>
<arg value="-title=${library.name}"/>
<arg value="-creator=${library.author}"/>
<arg value="-date=${build.time}"/>
</java>
</target>
<!--
Generate ASDoc output for the library
-->
<target name="doc" depends="properties">
<java jar="${asdoc}" fork="true" failonerror="true">
<jvmarg value="-Dapplication.home=${flexsdk.dir}"/>
<arg value="-library-path+=${lib.dir}"/>
<arg line="-o ${doc.dir}"/>
<arg line="-sp ${src.dir}"/>
<arg line="-ds ${src.dir} "/>
<arg line="-window-title 'Adobe ActionScript 3.0 Library - ${library.name}' "/>
</java>
</target>
<!--
Cleanup
-->
<target name="clean" description="clean up">
<delete dir="${build.dir}"/>
<delete dir="${bin.dir}"/>
<delete dir="${doc.dir}"/>
</target>
</project>