This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.xml
100 lines (88 loc) · 4 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
<?xml version="1.0" encoding="utf-8"?>
<project name="Flex TreeMap" default="build" basedir=".">
<property file="./sdk.local.properties"/>
<property file="./sdk.properties"/>
<property file="./build.local.properties"/>
<property file="./build.properties"/>
<target name="build" depends="prepare,build-lib,cleanup"/>
<target name="build-all" depends="build,build-docs,build-examples,package"/>
<target name="prepare">
<!-- delete old build -->
<delete dir="${output}" includeemptydirs="true"/>
<!-- copy required source files -->
<copy overwrite="true" todir="${source.output}">
<fileset dir="${source}"/>
</copy>
<!-- copy informational files -->
<copy overwrite="true" todir="${output}">
<fileset dir="${basedir}">
<include name="license.txt"/>
<include name="readme.txt"/>
</fileset>
</copy>
<!-- some useful timestamps that we'll need later -->
<tstamp>
<format property="date.today" pattern="MMddyyyy"/>
</tstamp>
<tstamp>
<format property="date.year" pattern="yyyy"/>
</tstamp>
</target>
<target name="cleanup">
</target>
<target name="build-lib" depends="prepare">
<exec executable="${compc}" dir="${basedir}" failonerror="true">
<arg line="--namespace ${library.mxmlNamespace} manifest.xml"/>
<arg line="--source-path '${source.output}'"/>
<arg line="--include-stylesheet defaults.css source/defaults.css"/>
<arg line="--include-namespaces ${library.mxmlNamespace}"/>
<arg line="--include-classes com.flextoolbox.controls.treeMapClasses.SliceAndDiceLayout"/>
<arg line="com.flextoolbox.controls.treeMapClasses.StripLayout"/>
<arg line="com.flextoolbox.controls.treeMapClasses.RecursiveSquarifyLayout"/>
<arg line="com.flextoolbox.controls.treeMapClasses.LiteTreeMapBranchRenderer"/>
<arg line="com.flextoolbox.controls.treeMapClasses.LiteTreeMapLeafRenderer"/>
<arg line="--external-library-path+='${flexsdk.lib}'"/>
<arg line="--output '${build.output}/${library.shortName}.swc'"/>
</exec>
</target>
<target name="build-docs" depends="build-lib">
<!-- build the examples that appear within the documentation -->
<exec executable="${mxmlc}" failonerror="true">
<arg line="--library-path+='${build.output}/${library.shortName}.swc'"/>
<arg line="--output '${docs.output}/com/flextoolbox/controls/examples/TreeMapExample.swf'"/>
<arg line="'${docs.examples}/com/flextoolbox/controls/examples/TreeMapExample.mxml'"/>
</exec>
<!-- build the asdocs -->
<exec executable="${asdoc}" dir="${basedir}" failonerror="true">
<arg line="--source-path '${source.output}'"/>
<arg line="--doc-sources '${source.output}'"/>
<arg line="--footer 'Copyright ${date.year} Josh Tynjala. All rights reserved.'"/>
<arg line="--main-title '${library.name} by Josh Tynjala'"/>
<arg line="--window-title '${library.name} by Josh Tynjala'"/>
<arg line="--templates-path '${docs.template}'"/>
<arg line="--output '${docs.output}'"/>
</exec>
</target>
<target name="build-examples" depends="build-lib">
<ant antfile="${examples}/GettingStarted/build.xml" target="build">
<property name="basedir" value="${examples}/GettingStarted"/>
<property name="output" value="${examples.output}/GettingStarted"/>
<property name="libs" value="${build.output}"/>
</ant>
<ant antfile="${examples}/IntroToTreeMap/build.xml" target="build">
<property name="basedir" value="${examples}/IntroToTreeMap"/>
<property name="output" value="${examples.output}/IntroToTreeMap"/>
<property name="libs" value="${build.output}"/>
</ant>
<ant antfile="${examples}/LayoutModes/build.xml" target="build">
<property name="basedir" value="${examples}/LayoutModes"/>
<property name="output" value="${examples.output}/LayoutModes"/>
<property name="libs" value="${build.output}"/>
</ant>
</target>
<target name="package">
<zip destfile="${library.shortName}${date.today}.zip">
<zipfileset dir="${output}"/>
</zip>
</target>
</project>