-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
54 lines (45 loc) · 2.05 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="java-diff-utils" default="jar" basedir=".">
<property name="version" value="1.3.0-SNAPSHOT"/>
<property name="src.dir" value="src/main/java" />
<property name="build.dir" location="build" />
<property name="dist.dir" value="dist" />
<property name="jar.file.name" value="${dist.dir}/${ant.project.name}-${version}.jar" />
<property name="javadoc.jar.file.name" value="${dist.dir}/${ant.project.name}-${version}-javadoc.jar" />
<property name="src.jar.file.name" value="${dist.dir}/${ant.project.name}-${version}-sources.jar" />
<property name="compiler.jdk.version" value="1.5" />
<target name="clean-compile">
<delete dir="${build.dir}" />
<mkdir dir="${build.dir}" />
</target>
<target name="clean-all" depends="clean-compile">
<delete dir="${dist.dir}" />
</target>
<target name="compile" depends="clean-compile">
<echo
message="Building with Java version: ${java.version} for JDK version: ${compiler.jdk.version}" />
<javac source="${compiler.jdk.version}" target="${compiler.jdk.version}"
deprecation="off" fork="true" memoryinitialsize="128m"
memorymaximumsize="256m" optimize="on" debug="on" depend="false"
srcdir="${src.dir}" destdir="${build.dir}">
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="${dist.dir}" />
<jar destfile="${jar.file.name}" basedir="${build.dir}" includes="**/*.class" />
</target>
<target name="source">
<mkdir dir="${dist.dir}" />
<jar jarfile="${src.jar.file.name}">
<fileset dir="${src.dir}" />
</jar>
</target>
<target name="javadoc">
<mkdir dir="${dist.dir}" />
<javadoc sourcepath="${src.dir}" destdir="${dist.dir}/javadoc" />
<jar jarfile="${javadoc.jar.file.name}">
<fileset dir="${dist.dir}/javadoc" />
</jar>
</target>
<target name="all" depends="clean-all, jar, source, javadoc" />
</project>