-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
92 lines (81 loc) · 3.45 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="jquery-json" default="default" basedir=".">
<description>Builds, tests, and runs the project.</description>
<!-- BASIC PROJECT PROPERTIES TO HELP TRACK VERSION -->
<property name="PROJECT_TITLE" value="jquery.json" />
<property name="BUILD_MAJOR" value="1" />
<property name="BUILD_MINOR" value="0" />
<property name="BUILD_ID" value="rc0" />
<property name="RELEASE"
value="${PROJECT_TITLE}.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}" />
<property name="PREFIX"
location="${basedir}/"
description="Target parent folder for built files"/>
<property name="SRC_DIR"
location="${PREFIX}/src"
description="Folder for source files" />
<property name="TEST_DIR"
location="${PREFIX}/test"
description="Folder for test target" />
<property name="DIST_DIR"
location="${PREFIX}/dist"
description="Folder for concat and min target" />
<!-- Files names for distribution -->
<property name="SOURCE"
value="${PROJECT_TITLE}.js" />
<property name="DIST"
location="${DIST_DIR}/${PROJECT_TITLE}.js" />
<property name="MIN"
location="${DIST_DIR}/${PROJECT_TITLE}.min.js" />
<!-- Plugin File Names for Distribution -->
<!-- BUILD TARGETS -->
<target name="default" depends="concat"/>
<target name="clean">
<delete dir="${DIST_DIR}" />
</target>
<target name="concat" description="Main claypool build">
<mkdir dir="${DIST_DIR}" />
<echo message="Building ${DIST}" />
<concat destfile="${DIST}">
<filterchain>
<replacetokens>
<token key="VERSION" value="${RELEASE}"/>
</replacetokens>
</filterchain>
<fileset dir="${basedir}" includes="${SOURCE}" />
</concat>
<echo message="${DIST} built." />
</target>
<target name="min" depends="concat" >
<echo message="Compressing Distibution" />
<java jar="${YUI_MIN_JAR}" fork="true">
<arg value="--charset=utf8"/>
<arg value="--line-break"/>
<arg value="8000"/>
<arg value="-o"/>
<arg value="${CLAYPOOL_ALL_MIN}"/>
<arg value="${CLAYPOOL_ALL}" />
<classpath>
<pathelement location="${RHINO_JAR}"/>
</classpath>
</java>
<echo message="Finished Compressing Distibution" />
</target>
<target name='test' depends='concat'>
<copy todir="${basedir}/test">
<fileset dir="${basedir}/../jquery-claypool/lib/">
<include name="jquery.js"/>
<include name="jqUnit.js"/>
</fileset>
<fileset dir="${basedir}/../jquery-claypool/test/">
<include name="jqUnit.js"/>
</fileset>
<fileset dir="${basedir}/../jqunit-spec/">
<include name="jqunit-spec.js"/>
</fileset>
<fileset dir="${basedir}/../jquery-jspath/dist/">
<include name="jquery.jspath.js"/>
</fileset>
</copy>
</target>
</project>