-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
80 lines (71 loc) · 2.92 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
<project name="dropdown-check-list" default="zip" basedir=".">
<property name="version" value="1.5"/>
<property name="dist.dir" value="dist"/>
<property name="yui-compressor.jar" location="ant_lib/yuicompressor-2.4.2.jar" />
<property name="yui-compressor-ant-task.jar" location="ant_lib/yui-compressor-ant-task-0.4.jar"/>
<path id="task.classpath">
<pathelement location="${yui-compressor.jar}" />
<pathelement location="${yui-compressor-ant-task.jar}" />
</path>
<!-- yui-compressor task definition-->
<taskdef name="yui-compressor" classname="net.noha.tools.ant.yuicompressor.tasks.YuiCompressorTask">
<classpath refid="task.classpath" />
</taskdef>
<target name="clean">
<delete dir="${dist.dir}"/>
</target>
<target name="init">
<mkdir dir="${dist.dir}/js"/>
<mkdir dir="${dist.dir}/css"/>
<mkdir dir="${dist.dir}/src"/>
<mkdir dir="${dist.dir}/doc"/>
<mkdir dir="${dist.dir}/zip"/>
</target>
<target name="copy">
<copy todir="${dist.dir}/src">
<fileset dir="src">
<exclude name="jquery-1.3.2.min.js"/>
<exclude name="jquery-1.4.2.min.js"/>
<exclude name="jquery-1.5.1.min.js"/>
<exclude name="jquery-1.6.1.min.js"/>
<exclude name="jquery-1.7.1.min.js"/>
<exclude name="jquery-ui-1.7.2.custom.min.js"/>
<exclude name="jquery-ui-1.8.4.custom.min.js"/>
<exclude name="jquery-ui-1.8.13.custom.min.js"/>
</fileset>
</copy>
<copy todir="${dist.dir}/css">
<fileset dir="src" includes="*.css"/>
</copy>
<copy todir="${dist.dir}/doc" includeEmptyDirs='false'>
<fileset dir="doc">
<exclude name="**/smoothness/**"/>
<exclude name="**/smoothness-1.8.13/**"/>
<exclude name="jquery-1.3.2.min.js"/>
<exclude name="jquery-1.4.2.min.js"/>
<exclude name="jquery-1.5.1.min.js"/>
<exclude name="jquery-1.6.1.min.js"/>
<exclude name="jquery-1.7.1.min.js"/>
<exclude name="jquery-ui-1.7.2.custom.min.js"/>
<exclude name="jquery-ui-1.8.4.custom.min.js"/>
<exclude name="jquery-ui-1.8.13.custom.min.js"/>
<!-- Exclude the older versions when doing the build -->
<exclude name="ui.dropdownchecklist-1.0-min.js"/>
<exclude name="ui.dropdownchecklist-1.1-min.js"/>
<exclude name="ui.dropdownchecklist-1.2qa-min.js"/>
<exclude name="ui.dropdownchecklist-1.3-min.js"/>
<exclude name="ui.dropdownchecklist-1.4-min.js"/>
</fileset>
</copy>
</target>
<target name="minify">
<yui-compressor warn="false" munge="true" preserveallsemicolons="false"
fromdir="src" todir="${dist.dir}/js" includes="ui.dropdownchecklist.js"/>
<move file="${dist.dir}/js/ui.dropdownchecklist-min.js"
tofile="${dist.dir}/js/ui.dropdownchecklist-${version}-min.js"/>
</target>
<target name="zip" depends="clean, init, copy, minify">
<zip destfile="${dist.dir}/zip/dropdown-check-list.${version}.zip"
basedir="${dist.dir}" excludes="zip"/>
</target>
</project>