-
Notifications
You must be signed in to change notification settings - Fork 69
/
build-jars.xml
62 lines (53 loc) · 1.85 KB
/
build-jars.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
<?xml version="1.0" encoding="UTF-8"?>
<!-- this does NOT compile the project, instead it just packages the classes and sources to two jar files-->
<project name="purejavahidapi" default="buildjar" basedir=".">
<target name="init">
<property name="build" value="${basedir}/build"/>
<property name="src" value="${basedir}/src"/>
<property name="dist" value="${basedir}/bin"/>
<property name="example" value="${basedir}/example"/>
<property name="class" value="${build}/classes"/>
<property name="class.example" value="${build}/example"/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${class}"/>
<mkdir dir="${class.example}"/>
<path id="compile">
<pathelement location="lib/jna-5.5.0.jar"/>
<pathelement location="lib/jna-platform-5.5.0.jar"/>
</path>
<path id="examples">
<pathelement location="lib/jna-5.5.0.jar"/>
<pathelement location="lib/jna-platform-5.5.0.jar"/>
<pathelement location="${class}"/>
</path>
</target>
<target name="clear" depends="init">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${class}" >
<classpath refid="compile"/>
</javac>
<javac srcdir="${example}" destdir="${class.example}" >
<classpath refid="examples"/>
</javac>
</target>
<target name="run.example1" depends="compile">
<java classname="Example1">
<classpath refid="examples"/>
<classpath>
<pathelement path="${class.example}"/>
</classpath>
</java>
</target>
<!-- create .jar -->
<target name="buildjar" depends="compile">
<jar jarfile="${dist}/purejavahidapi.jar" basedir="${class}">
</jar>
<jar jarfile="${dist}/purejavahidapi-src.jar" basedir="${src}">
</jar>
</target>
</project>
<!-- end file build.xml -->