-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.xml
89 lines (75 loc) · 2.91 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
<project name="RepDev" default="dist" basedir=".">
<description>
Creates a /bin directory that other people can checkout just for testing purposes
</description>
<!-- set global properties for this build -->
<property name="src" location="./" />
<property name="build" location="bin" />
<property name="dist" location="dist" />
<property name="swt-win" location="swt-win" />
<property name="swt-lin" location="swt-lin" />
<path id="project-classpath">
<fileset dir="${src}" includes="*.jar" />
<fileset dir="${swt-win}" includes="*.jar" />
<fileset dir="${swt-lin}" includes="*.jar" />
</path>
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<buildnumber file="dist/build.number" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" classpathref="project-classpath" includeantruntime="false"/>
</target>
<target name="dist" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}" />
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<!-- <jar jarfile="${dist}/RepDev-${DSTAMP}.jar" basedir="${build}"/> -->
<delete>
<fileset dir="${dist}" >
<include name="**/*.class"/>
</fileset>
</delete>
<copy todir="${dist}" overwrite="true">
<fileset dir="${src}">
<exclude name="**/*.java" />
<exclude name="**/*.conf" />
<exclude name="**/bin/**" />
<exclude name="**/dist/**" />
<exclude name="**/backup/**" />
<exclude name="**/swt-lin/**" />
<exclude name="**/.settings/**" />
<exclude name="**/.svn/**" />
<exclude name="**/.hg/**" />
<exclude name="**/swt-win/swt-debug.jar/**" />
<exclude name="**/swt-win/src.zip/**" />
</fileset>
</copy>
<delete dir="${build}" />
<delete dir="${dist}/bin" />
<delete dir="${dist}/backup" />
<delete dir="${dist}/dist" />
<!-- Now that the config is in the main folder, dont dist it -->
<delete file="${dist}/repdev.conf"/>
<delete file="${dist}/.hgignore"/>
<delete file="${dist}/.classpath"/>
<delete file="${dist}/.project"/>
<delete file="${dist}/stdout.txt"/>
<delete file="${dist}/stderr.txt"/>
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
<target name="Launcher-jar" description="Make a jar of the launcher">
<jar jarfile="com/repdev/launcher/launcher.jar"
basedir="com/repdev/launcher/"
excludes="*.jar,*.zip"
manifest="${src}/com/repdev/launcher/manifest.mf" />
</target>
</project>