-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
61 lines (50 loc) · 2.7 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="library" default="build" basedir=".">
<property name="project.src.dir" value="src"/>
<property name="project.build.artifactdir" value="./artifacts/"/>
<property name="project.build.version" value="0.1"/>
<!-- Setup classpath for js-build-tools ant tasks -->
<path id="js-build-tasks.classpath">
<pathelement location="."/>
<fileset dir="tools/js-build-tools/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<taskdef name="preprocess" classname="com.moxiecode.ant.tasks.PreProcessTask" classpathref="js-build-tasks.classpath" loaderref="js-build-tasks.classpath.loader" />
<taskdef name="yuicompress" classname="com.moxiecode.ant.tasks.YuiCompressTask" classpathref="js-build-tasks.classpath" loaderref="js-build-tasks.classpath.loader" />
<taskdef name="jslint" classname="com.googlecode.jslint4java.ant.JSLintTask" classpath="tools/jslint4java-1.4.1/jslint4java-1.4.1.jar" />
<target name="clean" depends="" description="Cleans up the project from temporary files">
<delete dir="work" quiet="true"/>
<delete dir="${project.build.artifactdir}v${project.build.version}" quiet="true"/>
</target>
<target name="jslint">
<jslint>
<formatter type="plain" />
<fileset dir="${project.src.dir}/client/" includes="*.js"/>
</jslint>
</target>
<target name="build" depends="clean,jslint">
<buildnumber/>
<mkdir dir="work"/>
<concat destfile="work/library.combined.js">
<fileset dir="." includes="${project.src.dir}/client/head.js.txt" />
<fileset dir="." includes="${project.src.dir}/lib/json2.js" />
<fileset dir="." includes="${project.src.dir}/lib/easyXDM.min.js" />
<fileset dir="." includes="${project.src.dir}/client/core.js" />
<fileset dir="." includes="${project.src.dir}/client/modules/*.js" />
<fileset dir="." includes="${project.src.dir}/client/libraries/example/modules/*.js" />
<fileset dir="." includes="${project.src.dir}/client/libraries/example/*.js" />
<fileset dir="." includes="${project.src.dir}/client/tail.js.txt" />
</concat>
<replace file="work/library.combined.js" token="%%version%%" value="${project.build.version}.${build.number}"/>
<!-- Process pre proccesing instructions like #if/#endif etc -->
<preprocess infile="work/library.combined.js" outfile="work/library.js"/>
<preprocess infile="work/library.combined.js" outfile="work/library.debug.js" defines="debug"/>
<!-- Compress the file using the YUI Compressor -->
<yuicompress infile="work/library.js" outfile="work/library.min.js" />
<delete file="work/library.combined.js" quiet="true"/>
<copy todir="${project.build.artifactdir}v${project.build.version}">
<fileset dir="work"/>
</copy>
</target>
</project>