This repository has been archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
common-build.xml
82 lines (74 loc) · 2.73 KB
/
common-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
<!--
BUILD COMMON TEMPLATE FILE. This gets included into most build.xml
files via the DTD system entity reference feature.
-->
<!-- global constants (hardcoded to OSX) -->
<property name="local-jdk-api" value="/localhost/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/English.lproj/Documentation/Reference/Java/"/>
<property name="web-jdk-api" value="http://java.sun.com/j2se/1.3/docs/api/"/>
<!-- common build constants -->
<property name="dir.src" value="${basedir}/src"/>
<property name="dir.build" value="${basedir}/bin"/>
<property name="dir.resources" value="${basedir}/support/resources"/>
<property name="dir.lib" value="${basedir}/lib"/>
<property name="dir.doc" value="${basedir}/doc"/>
<property name="dir.support" value="${basedir}/support"/>
<property name="dir.javadoc" value="${dir.doc}/javadoc"/>
<property name="app.name" value="${ant.project.name}"/>
<property name="app.jarfile" value="${app.abbr}.jar"/>
<!-- call this for a complete rebuild -->
<target name="all">
<antcall target="init"/>
<antcall target="clean"/>
<antcall target="java.compile"/>
<antcall target="java.jar"/>
</target>
<!-- remove all the compiled files -->
<target name="clean">
<delete dir="${dir.build}/"/>
<delete file="*.jar"/>
</target>
<!-- just start up the compilation -->
<target name="init">
<echo message="********************************************************"/>
<echo message="************** ${app.name} - Building v${app.ver}" />
<echo message="********************************************************"/>
<mkdir dir="${dir.build}"/>
<unzip dest="${dir.build}">
<fileset dir="${dir.lib}/">
<include name="*.zip"/>
<include name="*.jar"/>
</fileset>
</unzip>
</target>
<!-- compiles the actual code of this project -->
<target name="java.compile" depends="init">
<!-- copy over the lib classes to bin -->
<mkdir dir="${dir.build}/lib"/>
<unzip dest="${dir.build}">
<fileset dir="${dir.lib}">
<include name="**/*.jar"/>
</fileset>
</unzip>
<javac srcdir="${dir.src}" destdir="${dir.build}" />
<antcall target="java.jar"/>
</target>
<!-- package the compiled files into a jar -->
<target name="java.jar">
<!-- build the jar -->
<jar jarfile="${app.jarfile}" basedir="${dir.build}" />
</target>
<!-- build the javadoc... -->
<target name="doc.javadoc">
<delete dir="${dir.javadoc}"/>
<mkdir dir="${dir.javadoc}"/>
<javadoc
destdir="${dir.javadoc}"
author="true"
version="true"
use="true"
windowtitle="Rahulbotics : ${app.name}">
<packageset dir="src" defaultexcludes="yes"/>
<link href="${web-jdk-api}"/>
<!--<link href="http://developer.apple.com/techpubs/macosx/Java/Reference/api/"/>-->
</javadoc>
</target>