forked from chrelad/openlayers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
47 lines (40 loc) · 1.42 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
<?xml version="1.0"?>
<project name="geoportail-openlayers">
<import file="configs-build.xml" />
<macrodef name="merge-js">
<attribute name="destfile" />
<attribute name="path" />
<sequential>
<echo message="creating @{destfile}" />
<concat destfile="@{destfile}">
<path refid="@{path}" />
</concat>
</sequential>
</macrodef>
<macrodef name="compress-js">
<attribute name="dir" />
<attribute name="includes" />
<sequential>
<echo message="compressing @{includes}" />
<apply executable="java" parallel="false" failonerror="true" verbose="true" dest="@{dir}">
<fileset dir="@{dir}" includes="@{includes}" excludes="*-min.js" />
<arg line="-jar" />
<arg path="${com.yahoo.platform.yui:yuicompressor:jar}" />
<arg line="--type js" />
<srcfile />
<arg line="-o" />
<mapper type="glob" from="@{includes}" to="*-min.js" />
<targetfile />
</apply>
</sequential>
</macrodef>
<target name="merge">
<merge-js destfile="${build.dir}/openlayers.js" path="openlayers.standard.files" />
<merge-js destfile="${build.dir}/openlayers-full.js" path="openlayers.full.files" />
<merge-js destfile="${build.dir}/openlayers-lite.js" path="openlayers.lite.files" />
</target>
<target name="compress" depends="merge">
<compress-js dir="${build.dir}" includes="*.js" />
</target>
<target name="package-js" depends="merge,compress" />
</project>