forked from planetfederal/gxp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
113 lines (99 loc) · 3.9 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
108
109
110
111
112
113
<?xml version="1.0" encoding="UTF-8"?>
<project name="gxp" default="dist">
<description>
GXP Build File
</description>
<property name="src" location="src"/>
<property name="build" location="build"/>
<target name="init">
<mkdir dir="${build}"/>
<echo message="pulling in submodules"/>
<exec executable="git" failonerror="true">
<arg line="submodule init"/>
</exec>
<exec executable="git" failonerror="true">
<arg line="submodule sync"/>
</exec>
<exec executable="git" failonerror="true">
<arg line="submodule update"/>
</exec>
<echo message="building ringo jars"/>
<ant dir="externals/ringo" target="jar" inheritAll="false"/>
</target>
<target name="parsedocs" description="parse docs source from scripts">
<echo>Parsing doc sources.</echo>
<exec executable="jst" failonerror="true">
<arg value="jst.cfg"/>
</exec>
</target>
<target name="doc" depends="parsedocs" description="build documentation">
<echo>Building docs.</echo>
<exec executable="sphinx-build" failonerror="true">
<arg line="-b html"/>
<arg value="-d"/>
<arg path="${src}/doc/_build/doctrees"/>
<arg path="${src}/doc"/>
<arg path="${build}/doc"/>
</exec>
<delete dir="${build}/doc/_sources"/>
</target>
<target name="buildjs">
<echo>Building JavaScript.</echo>
<mkdir dir="${build}/script"/>
<java jar="externals/ringo/run.jar" fork="true" failonerror="true">
<sysproperty key="ringo.home" path="externals/ringo"/>
<arg path="externals/buildkit/lib/buildkit/build.js"/>
<arg line="-o ${build}/script buildjs.cfg"/>
</java>
</target>
<target name="examples">
<echo>Publishing examples with updated paths to scripts.</echo>
<mkdir dir="${build}/theme"/>
<copy todir="${build}/theme/openlayers">
<fileset dir="externals/openlayers/theme"/>
</copy>
<copy todir="${build}/theme/geoext">
<fileset dir="externals/geoext/resources"/>
</copy>
<copy todir="${build}/theme/gxp">
<fileset dir="${src}/theme"/>
</copy>
<copy todir="${build}/examples" overwrite="true">
<fileset dir="examples"/>
</copy>
<replace dir="${build}/examples"
token="../externals/openlayers/lib/OpenLayers.js"
value="../script/OpenLayers.js"
includes="**/*.html"/>
<replace dir="${build}/examples"
token="../externals/geoext/lib/GeoExt.js"
value="../script/GeoExt.js"
includes="**/*.html"/>
<replace dir="${build}/examples"
token="../src/script/loader.js"
value="../script/gxp.js"
includes="**/*.html"/>
<replace dir="${build}/examples"
token="../src/theme/all.css"
value="../theme/gxp/all.css"
includes="**/*.html"/>
<replace dir="${build}/examples"
token="../externals/openlayers/theme"
value="../theme/openlayers"
includes="**/*.html"/>
<replace dir="${build}/examples"
token="../externals/geoext/resources"
value="../theme/geoext"
includes="**/*.html"/>
<!-- special handling for OL controls that use this img dir -->
<copy todir="${build}/script/img">
<fileset dir="externals/openlayers/img"/>
</copy>
</target>
<target name="dist" depends="clean, init, doc, buildjs, examples" description="prepare lib for distribution">
<echo>Preparing for distribution.</echo>
</target>
<target name="clean" description="remove previous build">
<delete dir="${build}"/>
</target>
</project>