-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
93 lines (84 loc) · 3.25 KB
/
build.xml
File metadata and controls
93 lines (84 loc) · 3.25 KB
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
<project name="roombaNet" basedir="." default="main">
<property name="src.dir" value="src" />
<property name="docs.dir" value="docs" />
<property name="lib.dir" value="lib" />
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="javadocs.dir" value="${docs.dir}/api" />
<property name="jar.dir" value="${build.dir}/jar" />
<property name="dist.dir" value="dist" />
<property name="main-class" value="com.hackingroomba.roombacomm.RoombaCommGUI" />
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="rxtx/*.jar" />
</fileset>
</path>
<target name="clean">
<echo>cleaning ${build.dir}</echo>
<delete defaultexcludes="true" includeemptydirs="true">
<fileset dir="${build.dir}"/>
</delete>
</target>
<target name="compile">
<echo>compiling project to ${classes.dir}...</echo>
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" />
<copy todir="${classes.dir}">
<fileset dir="${src.dir}" excludes="**/*.java"/>
</copy>
<echo>copying ${src.dir}/processing-examples into ${build.dir}...</echo>
<copy todir="${build.dir}">
<fileset dir="${src.dir}/processing-examples" excludes="**/*"/>
</copy>
</target>
<target name="dist" depends="jar">
<echo>buidling distribution directory for the project ${dist.dir}...</echo>
<mkdir dir="${dist.dir}" />
<echo>copying ready to use Jars to ${dist.dir}</echo>
<copy todir="${dist.dir}" file="${jar.dir}/roombacomm.jar"/>
<copy todir="${dist.dir}" file="${lib.dir}/rxtx/RXTXcomm.jar"/>
<copy todir="${dist.dir}" file="${lib.dir}/jargs.jar"/>
<echo>double click on ${dist.dir}/roombacomm.jar to start a GUI</echo>
</target>
<target name="jar" depends="compile">
<echo>buidling roombacomm.jar...</echo>
<mkdir dir="${jar.dir}" />
<copy todir="${jar.dir}" file="${lib.dir}/rxtx/RXTXcomm.jar"/>
<copy todir="${jar.dir}" file="${lib.dir}/rxtx/librxtxSerial.so"/>
<copy todir="${jar.dir}" file="${lib.dir}/rxtx/rxtxSerial.dll"/>
<copy todir="${jar.dir}" file="${lib.dir}/jargs.jar"/>
<jar destfile="${jar.dir}/roombacomm.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}" />
<attribute name="Class-Path" value="RXTXcomm.jar jargs.jar"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<echo>running ${jar.dir}/roombacomm.jar</echo>
<java jar="${jar.dir}/roombacomm.jar" fork="true" />
</target>
<target name="clean-build" depends="clean,jar" />
<target name="main" depends="clean,compile" />
<target name="javadoc" depends="compile">
<echo>buidling roombacomm java docs in ${javadocs.dir}...</echo>
<echo> for this ant target to work you need to have a java SDK installed (not just a JRE) and in the PATH environment setting too.</echo>
<javadoc
classpathref="classpath"
destdir="${javadocs.dir}"
access="public"
author="true"
version="true"
use="true"
noindex="false"
nonavbar="false"
notree="false"
nodeprecated="false"
nodeprecatedlist="false"
source="1.6"
splitindex="true"
sourcepath="${src.dir}">
</javadoc>
</target>
</project>