-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.xml
196 lines (167 loc) · 7.09 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
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
186
187
188
189
190
191
192
193
194
195
<project name="JAZZY - Java Spell Checker" default="clean-build-all" basedir=".">
<!-- set global properties for this build (directory names) -->
<property name="src" value="src"/>
<property name="build" value="bin"/>
<property name="dist" value="dist"/>
<property name="dict" value="dict"/>
<property name="www" value="www"/>
<property name="javadoc" value="javadoc"/>
<property name="jedit-config" value="${src}/com/swabunga/spell/jedit/config"/>
<property name="target" value="1.1"/>
<property name="package" value="com.swabunga.spell.event"/>
<property name="verbose" value="false"/>
<property name="jsdk-lib" value=""/>
<property name="junit" value=""/>
<property name="extrafiles" value="CONTRIBUTORS.txt,LICENSE.txt,README.txt"/>
<!-- Build classpath -->
<path id="classpath.id">
<pathelement path="${classpath}"/>
<pathelement location="${junit}"/>
<!-- external libs needed for build
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
-->
</path>
<path id="bootclass.path">
<fileset dir="${jsdk-lib}">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/lib"/>
<mkdir dir="${www}"/>
<mkdir dir="${www}/dict"/>
<mkdir dir="${javadoc}"/>
</target>
<target name="compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<javac deprecation="true" verbose="${verbose}" srcdir="${src}" destdir="${build}" target="${target}" source="1.3">
<classpath refid="classpath.id"/>
<exclude name="com/swabunga/spell/jedit/**"/>
<exclude name="com/swabunga/test/**"/>
</javac>
<copy todir="${build}" >
<fileset dir="${src}" >
<include name="**/*.properties"/>
</fileset>
<fileset dir="${basedir}" includes="${extrafiles}"/>
</copy>
</target>
<target name="cross-compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<javac deprecation="true" verbose="${verbose}" srcdir="${src}" destdir="${build}" target="${target}"
bootclasspathref="bootclass.path">
<classpath refid="classpath.id"/>
<exclude name="com/swabunga/spell/jedit/**"/>
<exclude name="com/swabunga/test/**"/>
</javac>
<copy todir="${build}" >
<fileset dir="${src}" >
<include name="**/*.properties"/>
</fileset>
<fileset dir="${basedir}" includes="${extrafiles}"/>
</copy>
</target>
<target name="debug-compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<javac debug="true" srcdir="${src}" destdir="${build}"
target="${target}" classpath="${classpath};${junit}">
<!-- <classpath refid="classpath.id"/> -->
<exclude name="com/swabunga/spell/jedit/**"/>
</javac>
<copy todir="${build}" >
<fileset dir="${src}" >
<include name="**/*.properties"/>
</fileset>
<fileset dir="${basedir}" includes="${extrafiles}"/>
</copy>
</target>
<target name="clean-debug-compile" depends="clean,debug-compile"/>
<target name="clean-build-all" depends="clean,applet,library-core,library-swing,library-all,examples,source-release,binary-release"/>
<target name="clean-compile" depends="clean,compile"/>
<target name="javadoc" depends="init">
<!-- Compile the javadoc from ${src} into ${javadoc} -->
<javadoc sourcepath="${src}" destdir="${javadoc}" packagenames="com.swabunga.spell.*">
<classpath refid="classpath.id"/>
</javadoc>
</target>
<target name="clean">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${javadoc}"/>
<delete file="${www}/jazzy-applet.jar"/>
<delete dir="${www}/dict"/>
</target>
<target name="applet" depends="compile">
<jar jarfile="${www}/jazzy-applet.jar" basedir="${build}"/>
<zip basedir="${dict}" zipfile="${www}/dict/english.0.zip" includes="english.0"/>
</target>
<target name="dictionary-release">
<zip zipfile="${dist}/english.0.zip" basedir="${dict}" includes="**/english.0" />
</target>
<target name="website" depends="applet,dictionary-release">
<copy file="${dist}/english.0.zip" todir="${www}/dict"/>
</target>
<target name="javadoc-release" depends="javadoc">
<!-- Create the distribution directories -->
<zip zipfile="${dist}/jazzy-doc.zip" basedir="${javadoc}"/>
</target>
<target name="source-release">
<!-- Create the distribution directories -->
<zip zipfile="${dist}/jazzy-src.zip" basedir="."
excludes="www/dict/**,bin/**,dist/**,dict/**,src/**/jedit/**,test/**,javadoc/**"/>
</target>
<target name="binary-release" depends="compile,library-core,library-swing,examples">
<copy todir="${dist}/lib" >
<fileset dir="${basedir}" includes="${extrafiles}"/>
</copy>
<zip zipfile="${dist}/jazzy-bin.zip" basedir="${dist}/lib" includes="${extrafiles},jazzy-core.jar,jazzy-swing.jar,jazzy-examples.jar"/>
</target>
<target name="library-core" depends="compile">
<jar jarfile="${dist}/lib/jazzy-core.jar" basedir="${build}" includes="**,${extrafiles}" excludes="com/swabunga/spell/examples/**,com/swabunga/spell/swing/**"/>
</target>
<target name="library-all" depends="compile">
<jar jarfile="${dist}/lib/jazzy.jar" basedir="${build}" includes="**,${extrafiles}" excludes="**/test/**,**/jedit/**">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
</manifest>
</jar>
</target>
<target name="library-swing" depends="compile">
<jar jarfile="${dist}/lib/jazzy-swing.jar" basedir="${build}" includes="com/swabunga/spell/swing/**,${extrafiles}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Class-Path" value="jazzy-core.jar"/>
</manifest>
</jar>
</target>
<target name="examples" depends="compile">
<jar jarfile="${dist}/lib/jazzy-examples.jar" basedir="${build}" includes="com/swabunga/spell/examples/**,${extrafiles}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Class-Path" value="jazzy-core.jar $jazzy-swing.jar"/>
<attribute name="Main-Class" value="com.swabunga.spell.examples.JTextComponentSpellCheckExample"/>
</manifest>
</jar>
</target>
<target name="compile-test" depends="debug-compile">
<java classname="com.swabunga.test.spell.event.TeXWordFinderTester"
fork="true" classpath="bin;${junit}"/>
<java classname="com.swabunga.test.spell.event.FileWordTokenizerTester"
fork="true" classpath="bin;${junit}" dir="."/>
<java classname="com.swabunga.test.spell.event.StringWordTokenizerTester"
fork="true" classpath="bin;${junit}" dir="."/>
<java classname="com.swabunga.test.spell.event.SpellCheckerTester"
fork="true" classpath="bin;${junit}" dir="."/>
</target>
<!-- Build jEdit Plugin from jedit_build.xml Ant file. -->
<target name="jedit-plugin-install">
<ant antfile="jedit_build.xml" target="jedit-clean-install"></ant>
</target>
</project>