-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
74 lines (66 loc) · 2.94 KB
/
build.xml
File metadata and controls
74 lines (66 loc) · 2.94 KB
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
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="java-immutable-collections" default="dist" basedir=".">
<description>
Build, test, javadoc, and distribution for java-immutable-collections.
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="test" location="testsrc"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${build}/dist" />
<mkdir dir="${build}/test" />
<mkdir dir="${build}/javadoc" />
</target>
<target name="resolve" description="retrieve test dependencies with Ivy - no dependencies">
<ivy:resolve resolveMode="default" keep="true"/>
<ivy:retrieve pattern="testlib/[artifact]-[revision].[ext]" type="jar" conf="test" />
</target>
<target name="compile" depends="init"
description="compile the distribution source">
<javac srcdir="${src}" destdir="${build}/dist" source="1.8" target="1.8" includeantruntime="false">
<compilerarg value="-Xlint:unchecked" />
</javac>
</target>
<target name="test" depends="compile"
description="compile and run tests">
<javac srcdir="${test}" destdir="${build}/test" source="1.8" target="1.8" includeantruntime="false" classpath="${build}/dist">
<classpath>
<pathelement path="${build}/dist"/>
<fileset dir="testlib">
<include name="*.jar"/>
</fileset>
</classpath>
<compilerarg value="-Xlint:unchecked" />
</javac>
<junit fork="true" printsummary="true">
<classpath>
<pathelement path="${build}/dist"/>
<pathelement path="${build}/test"/>
<fileset dir="testlib">
<include name="*.jar"/>
</fileset>
</classpath>
<test name="net.njcull.collections.TestAll" />
</junit>
</target>
<target name="javadoc" depends="init"
description="javadoc the source files">
<javadoc sourcepath="${src}" destdir="${build}/javadoc" author="false" windowtitle="Java Immutable Collections for Java 1.8">
</javadoc>
</target>
<target name="dist" depends="compile,test,javadoc"
description="generate the distribution">
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/lib/java-immutable-collections-${DSTAMP}.jar" basedir="${build}/dist"/>
<zip zipfile="${dist}/lib/java-immutable-collections-javadoc-${DSTAMP}.zip" basedir="${build}/javadoc"/>
</target>
<target name="clean" description="clean up">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>