This repository has been archived by the owner on May 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-import.xml
185 lines (153 loc) · 6.34 KB
/
build-import.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<project name="project" default="compile">
<!-- Folders and File Names -->
<tstamp>
<format property="build.date" pattern="yyyy.MM.dd.HHmmssSSS" locale="en,US"/>
</tstamp>
<property name="build.version.appendix" value="SNAPSHOT" />
<property name="build.version.number" value="${build.date}" />
<property name="build.version" value="${build.version.number}-${build.version.appendix}" />
<property name="src.dir" value="src" />
<property name="examples.dir" value="examples" />
<property name="bin.dir" value="bin" />
<property name="build.dir" value="build" />
<property name="jar.dir" value="${build.dir}/jar" />
<property name="docs.dir" value="${build.dir}/docs" />
<property name="zip.dir" value="${build.dir}/zip" />
<property name="jar.filename" value="${project.archive}-${build.version}.jar" />
<property name="jar.sources.filename" value="${project.archive}-${build.version}-sources.jar" />
<property name="jar.javadoc.filename" value="${project.archive}-${build.version}-javadoc.jar" />
<property name="zip.filename" value="${project.archive}-bin-${build.version}.zip" />
<property name="zip.sources.filename" value="${project.archive}-src-${build.version}.zip" />
<property name="zip.javadoc.filename" value="${project.archive}-javadocs-${build.version}.zip" />
<!-- Filesets -->
<patternset id="pattern.documents">
<include name="README.*" />
<include name="READ.ME" />
<include name="docs/*.*" />
</patternset>
<fileset id="fileset.documents" dir=".">
<patternset refid="pattern.documents" />
</fileset>
<!-- Targets -->
<target name="get.os">
<condition property="os.isWindows" value="true" else="false">
<os family="windows" />
</condition>
<condition property="os.isOSX" value="true" else="false">
<and>
<os family="mac" />
<os family="unix" />
</and>
</condition>
<condition property="os.isLinux32" value="true" else="false">
<and>
<os family="unix" />
<os arch="x86" />
</and>
</condition>
<condition property="os.isLinux64" value="true" else="false">
<and>
<os family="unix" />
<os arch="x64" />
</and>
</condition>
<condition property="os.bash" value="true" else="false">
<or>
<os family="mac" />
<os family="unix" />
</or>
</condition>
</target>
<target name="clean.compile" description="Cleans up the compiled binaries.">
<delete dir="${bin.dir}" includeemptydirs="true" casesensitive="false"/>
</target>
<target name="clean.jar" description="Cleans up the compiled JARs.">
<delete dir="${jar.dir}" includeemptydirs="true" casesensitive="false"/>
</target>
<target name="clean.docs" description="Cleans up the compiled documentation.">
<delete dir="${docs.dir}" includeemptydirs="true" casesensitive="false" />
</target>
<target name="clean.zip" description="Cleans up the zipped archives.">
<delete dir="${zip.dir}" includeemptydirs="true" casesensitive="false" />
</target>
<target name="clean" depends="clean.jar, clean.docs, clean.zip, clean.compile" description="Cleans up everything.">
</target>
<target name="init.compile" depends="clean.compile" description="Initializes the compilation folders.">
<mkdir dir="${bin.dir}" />
</target>
<target name="init.docs" depends="clean.docs" description="Initializes the documentation folders.">
<mkdir dir="${docs.dir}" />
</target>
<target name="init.jar" depends="clean.jar" description="Initializes the JAR folders.">
<mkdir dir="${jar.dir}" />
</target>
<target name="init.zip" depends="clean.zip" description="Initializes the ZIP folders.">
<mkdir dir="${zip.dir}" />
</target>
<target name="javadoc" depends="init.docs" description="Builds the documentation.">
<javadoc access="protected"
additionalparam="-J-Xmx512m " author="true"
classpath="${project.classpath}${path.separator}${bin.dir}"
doctitle="${project.javadoc.title}"
sourcepath="${src.dir}"
packagenames="${project.javadoc.packages}"
destdir="${docs.dir}"
source="1.8"
splitindex="true"
use="true"
version="true"
nodeprecated="false"
nodeprecatedlist="false"
noindex="false"
nonavbar="false"
notree="false"
>
<link href="http://download.oracle.com/javase/6/docs/api/"/>
</javadoc>
</target>
<target name="compile" depends="init.compile" description="Compiles the project.">
<javac
source="1.8"
srcdir="${src.dir}"
destdir="${bin.dir}"
includeAntRuntime="false"
classpath="${project.classpath}"
debug="off"
/>
</target>
<target name="jar.bin" depends="init.jar, compile" description="JARs up the compiled files.">
<jar basedir="${bin.dir}" destfile="${jar.dir}/${jar.filename}" />
</target>
<target name="jar.sources" depends="init.jar" description="JARs up the sources.">
<jar basedir="${src.dir}" destfile="${jar.dir}/${jar.sources.filename}" />
</target>
<target name="jar.javadoc" depends="init.jar, javadoc" description="JARs up the Javadoc files.">
<jar basedir="${docs.dir}" destfile="${jar.dir}/${jar.javadoc.filename}" />
</target>
<target name="jar" depends="jar.bin, jar.sources, jar.javadoc" description="Generates all JARs.">
</target>
<target name="zip.jar" depends="init.zip, jar.bin" description="Archives the JARs.">
<delete file="${zip.dir}/${zip.filename}" />
<zip basedir="${jar.dir}" destfile="${zip.dir}/${zip.filename}"></zip>
<zip destfile="${zip.dir}/${zip.filename}" update="true" >
<fileset refid="fileset.documents" />
</zip>
</target>
<target name="zip.docs" depends="init.zip, javadoc" description="Archives the documentation.">
<delete file="${zip.dir}/${zip.javadoc.filename}" />
<zip basedir="${docs.dir}" destfile="${zip.dir}/${zip.javadoc.filename}" compress="true"></zip>
</target>
<target name="zip.src" depends="init.zip" description="Archives the source code.">
<delete file="${zip.dir}/${zip.sources.filename}" />
<zip basedir="${src.dir}" destfile="${zip.dir}/${zip.sources.filename}" compress="true"></zip>
<zip destfile="${zip.dir}/${zip.filename}" update="true">
<fileset refid="fileset.documents" />
</zip>
</target>
<target name="zip" depends="zip.jar, zip.docs, zip.src" description="Creates all archives.">
</target>
<target name="release" depends="zip">
</target>
</project>