-
Notifications
You must be signed in to change notification settings - Fork 14
/
jedit_build.xml
132 lines (114 loc) · 4.13 KB
/
jedit_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
<project name="Jazzy - jEdit Plugin." default="jedit-install" basedir=".">
<!-- set global properties for this build (directory names) -->
<property file="build.properties"/>
<property file="../build.properties"/>
<property file="${user.home}/.build.properties"/>
<property file="${user.home}/build.properties"/>
<property name="src" value="src"/>
<property name="build" value="bin"/>
<property name="dist" value="dist"/>
<property name="dict" value="dict"/>
<property name="javadoc" value="javadoc"/>
<property name="jedit-config" value="${src}/com/swabunga/spell/jedit/config"/>
<property name="target" value="1.3"/>
<property name="package" value="com.swabunga.spell.event"/>
<property name="jedit" value=""/>
<property name="test-class" value="DefaultWordFinder"/>
<!-- <property name="local.jedit.jars" value=".."/>
-->
<!-- Build classpath -->
<path id="classpath">
<pathelement path="${classpath}"/>
<!-- external libs needed for build
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
-->
</path>
<path id="bootclass.path">
<fileset dir="${crosscompiler.lib}">
<include name="*.jar"/>
</fileset>
</path>
<selector id="jedit-src">
<or>
<filename name="com/swabunga/spell/jedit/*.java"/>
<filename name="com/swabunga/spell/engine/*.java"/>
<filename name="com/swabunga/spell/event/*.java"/>
<filename name="com/swabunga/spell/swing/JSpellDialog.java"/>
<filename name="com/swabunga/spell/swing/JSpellForm.java"/>
</or>
</selector>
<target name="init">
<condition property="can.reload.plugins">
<and>
<available classname="org.gjt.sp.jedit.jEdit"/>
<available classname="ReloadPluginTask"/>
</and>
</condition>
<!-- Create the time stamp -->
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/lib"/>
<mkdir dir="${javadoc}"/>
</target>
<target name="cross-compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<javac deprecation="true" verbose="${compiler.verbose}" srcdir="${src}" destdir="${build}" target="${target}"
bootclasspathref="bootclass.path" debug="compiler.debug">
<selector refid="jedit-src"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="javadoc" depends="init">
<!-- Compile the javadoc from ${src} into ${javadoc} -->
<javadoc sourcepath="${src}" destdir="${javadoc}" packagenames="com.swabunga.spell.*">
<fileset>
<selector refid="jedit-src"/>
</fileset>
<classpath refid="classpath"/>
</javadoc>
</target>
<target name="clean">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${javadoc}"/>
</target>
<target name="pack" depends="init">
<copy todir="${build}">
<fileset dir="${jedit-config}"/>
<fileset dir="${dict}" includes="english.0"/>
<fileset dir="${src}" >
<include name="**/*.properties"/>
<exclude name="**/examples/*"/>
</fileset>
</copy>
</target>
<target name="build" depends="cross-compile,pack">
<jar jarfile="${dist}/lib/jazzy.jar" basedir="${build}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
</manifest>
</jar>
<zip basedir="../" zipfile="${dist}\JazzySrc${DSTAMP}.zip">
<include name="jazzy/jedit_build.xml"/>
<include name="jazzy/${dict}/english.0"/>
<include name="jazzy/src/**"/>
<exclude name="jazzy/**/examples/*"/>
</zip>
</target>
<target name="test" depends="debug-compile">
<java classpath="%CLASSPATH%;${build}"
classname="${package}.${test-class}"/>
</target>
<target name="deploy" depends="build">
<copy file="${dist}\LaTeXTools.jar" todir="${jedit.jars.dir}"/>
<antcall target="reload"/>
</target>
<target name="reload" if="can.reload.plugins">
<taskdef name="reloadPlugin" classname="ReloadPluginTask"/>
<reloadPlugin jarfile="${jedit.jars.dir}/LaTeXTools.jar"/>
</target>
</project>