forked from mbuzdalov/testlib4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
58 lines (50 loc) · 1.99 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
<?xml version="1.0" encoding="utf-8"?>
<project name="testlib4j" default="compile-src" basedir=".">
<property name="build.dir" location="build"/>
<property name="deploy.dir" location="deploy"/>
<property name="src.source.dir" location="src"/>
<property name="src.build.dir" location="${build.dir}/src"/>
<property name="tests.source.dir" location="tests"/>
<property name="tests.build.dir" location="${build.dir}/tests"/>
<property name="examples.dir" location="examples"/>
<property name="examples.tmp.dir" location="${examples.dir}/tmp"/>
<path id="src.deps">
<pathelement location="${src.build.dir}"/>
</path>
<target name="init">
<tstamp>
<format property="DSTAMP" pattern="yyyy-MM-dd" locale="US"/>
</tstamp>
<mkdir dir="${build.dir}"/>
<mkdir dir="${deploy.dir}"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${deploy.dir}"/>
<delete>
<fileset dir="${examples.dir}" includes="*.jar"/>
</delete>
</target>
<target name="compile-src" depends="init">
<mkdir dir="${src.build.dir}"/>
<javac
srcdir="${src.source.dir}"
destdir="${src.build.dir}"
encoding="utf-8"
includeantruntime="false"
>
<compilerarg value="-Xlint:unchecked"/>
</javac>
<jar destfile="${deploy.dir}/testlib4j.jar" basedir="${src.build.dir}"/>
</target>
<target name="compile-examples" depends="compile-src">
<mkdir dir="${examples.tmp.dir}"/>
<!-- CompareNumber.java -->
<javac srcdir="${examples.dir}" destdir="${examples.tmp.dir}" includeantruntime="false">
<include name="CompareNumber.java"/>
<classpath refid="src.deps"/>
</javac>
<jar destfile="${examples.dir}/CompareNumber.jar" basedir="${examples.tmp.dir}"/>
<delete dir="${examples.tmp.dir}"/>
</target>
</project>