This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
98 lines (85 loc) · 3.15 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
93
94
95
96
97
98
<?xml version="1.0" encoding="UTF-8"?>
<project name="cuelib" default="makeDist" basedir=".">
<!-- Date on which the release was built. -->
<tstamp>
<format property="release.date" pattern="yyyy-MM-dd"/>
</tstamp>
<!-- Configuration. -->
<property name="release.version" value="1.2.0"/>
<property name="release.printname" value="Cuelib version ${release.version}"/>
<property name="src" value="src"/>
<property name="bin" value="bin"/>
<property name="dist" value="dist"/>
<property name="doc" value="doc"/>
<property name="doc.api" value="${doc}/api"/>
<property name="config" value="config"/>
<property name="javadoc.stylesheet" value="${config}/${doc}/stylesheet.css"/>
<property name="javadoc.external" value="http://java.sun.com/j2se/1.5.0/docs/api/"/>
<!-- Compile the project. -->
<target name="compile" depends="binDir">
<javac srcdir="${src}" destdir="${bin}"/>
</target>
<!-- Create the directory for the binaries. -->
<target name="binDir">
<mkdir dir="${bin}"/>
</target>
<!-- Create the directory for the distribution. -->
<target name="distDir">
<mkdir dir="${dist}"/>
</target>
<!-- Create the directory for the docs. -->
<target name="docDir">
<mkdir dir="${doc.api}"/>
</target>
<!-- Create the docs. -->
<target name="makeDoc" depends="docDir">
<javadoc destDir="${doc.api}"
Windowtitle="${release.printname}"
stylesheetfile="${javadoc.stylesheet}"
link="${javadoc.external}"
>
<fileset includes="**/*.java" dir="${src}"/>
</javadoc>
</target>
<!-- Create the jar file. -->
<target name="makeJar" depends="compile, distDir">
<jar jarfile="${dist}/cuelib-${release.version}-${release.date}.jar"
includes="**/*.class"
basedir="${bin}"
index="true"
>
<metainf includes="lgpl-2.1.txt" dir="${basedir}"/>
</jar>
</target>
<!-- Remove all generated artifacts. -->
<target name="clean">
<delete dir="${bin}"/>
<delete dir="${dist}"/>
<delete dir="${doc.api}"/>
</target>
<!-- Create a zip containing the docs. -->
<target name="zipDocs" depends="makeDoc, distDir">
<zip zipfile="${dist}/cuelib-docs-${release.version}-${release.date}.zip" includes="**/*" basedir="${doc}">
<fileset includes="lgpl-2.1.txt" dir="${basedir}"/>
</zip>
</target>
<!-- Create a zip containing the sources. -->
<target name="zipSources" depends="distDir">
<zip zipfile="${dist}/cuelib-src-${release.version}-${release.date}.zip"
includes="src/**/*"
basedir="${basedir}"
>
<fileset includes="lgpl-2.1.txt" dir="${basedir}"/>
<fileset includes="build.xml" dir="${basedir}"/>
</zip>
</target>
<!-- Create a zip file containing the binaries, sources, and docs. -->
<target name="zipAll" depends="makeJar, zipDocs, zipSources">
<zip zipfile="${dist}/cuelib-complete-${release.version}-${release.date}.zip">
<fileset includes="cuelib*-${release.version}-${release.date}.zip" dir="${dist}"/>
<fileset includes="cuelib*-${release.version}-${release.date}.jar" dir="${dist}"/>
</zip>
</target>
<!-- Create a distribution. -->
<target name="makeDist" depends="clean, zipAll"/>
</project>