-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDriverStationClientCodeBuild.xml
71 lines (58 loc) · 2.31 KB
/
DriverStationClientCodeBuild.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
<project name="DriverStationClientCodeBuild" default="build">
<property name="lib.dir" value="lib"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="source.dir" value="networktables-input"/>
<condition property="is_windows">
<os family="windows"/>
</condition>
<condition property="is_linux">
<os family="unix"/>
</condition>
<path id="build.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
<exclude name="Networktables*.jar" />
<include if="is_windows" name="NetworkTables-3.1.7-desktop.jar" />
<include if="is_linux" name="NetworkTables.jar" />
</fileset>
<!-- If we're on Windows, include the desktop JAR. -->
<!-- <pathelement location="${build}" /> -->
</path>
<target name="debug">
<!-- Convert the build.classpath ID into a local property so we cna print it out. -->
<pathconvert property="foo" refid="build.classpath"/>
<echo message="${foo}" />
</target>
<target name="clean">
<delete verbose="true">
<fileset dir="${classes.dir}" includes="**/*.class" />
<fileset dir="." includes="networktable-input.jar" />
</delete>
</target>
<!-- If this fails on the JavaFX imports and you're on a Raspberry
Pi, consider running "apt-get install openjfx". -->
<target name="compile" description="Builds a stand-alone, client JAR file that can be deployed on driver station. The JAR program handles both vision processing and keyboard input.">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${source.dir}"
destdir="${classes.dir}"
debug="on"
includeAntRuntime="false"
verbose="true">
<include name="**/*.java" />
<classpath refid="build.classpath" />
</javac>
</target>
<target name="jar" depends="compile">
<jar destfile="networktables-input.jar"
basedir="${classes.dir}"
includes="**/*.class"
excludes="">
<manifest>
<attribute name="Main-Class" value="main.NetworkTablesInput" />
<attribute name="Class-Path" value="." />
</manifest>
<zipfileset prefix="classes" src="lib/NetworkTables.jar"/>
</jar>
</target>
</project>