forked from cocaine/cocaine-framework-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
43 lines (38 loc) · 1.3 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
<?xml version="1.0" encoding="utf-8"?>
<project name="cocaine-framework-java" basedir="." default="jar">
<target name="clean">
<delete dir="target"/>
</target>
<target name="compile">
<mkdir dir="target/classes"/>
<javac source="1.6" target="1.6" destdir="target/classes" debug="true" encoding="utf-8" includeantruntime="false">
<src path="src/main/java"/>
<src path="src/test/java"/>
</javac>
</target>
<target name="generate-jni-interfaces" depends="compile">
<mkdir dir="target/generated"/>
<javah destdir="target/generated" force="yes">
<classpath>
<pathelement location="target/classes" />
</classpath>
<class name="cocaine.dealer.DealerImpl"/>
<class name="cocaine.dealer.ResponseImpl"/>
</javah>
</target>
<target name="compile-native" depends="generate-jni-interfaces">
<mkdir dir="target/obj"/>
<mkdir dir="target/lib"/>
<exec executable="src/main/bin/build-native.sh" failonerror="true"/>
</target>
<target name="jar" depends="compile, compile-native">
<mkdir dir="target/jars"/>
<jar destfile="target/jars/cocaine-framework-java.jar">
<fileset dir="target/classes"/>
</jar>
<jar destfile="target/jars/cocaine-framework-java-source.jar">
<fileset dir="src/main/java"/>
</jar>
</target>
<target name="rebuild" depends="clean, jar"/>
</project>