btstack/platform/daemon/binding/java/build.xml
2022-04-02 16:04:02 +02:00

56 lines
1.7 KiB
XML

<project name="BTstack" basedir="." default="main">
<property name="src.dir" value="src"/>
<property name="gen.dir" value="gen"/>
<property name="example.dir" value="example"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="test-class" value="com.bluekitchen.SPPStreamerClient"/>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${gen.dir}"/>
</target>
<target name="generate">
<mkdir dir="${gen.dir}"/>
<exec executable="../../../../tool/java_binding.py"/>
</target>
<target name="compile" depends="generate">
<mkdir dir="${classes.dir}"/>
<javac destdir="${classes.dir}"
classpath="jna-4.5.1.jar">
<src path="${src.dir}" />
<src path="${gen.dir}" />
<src path="${example.dir}" />
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
<manifest>
<attribute name="test-class" value="${test-class}"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java fork="true" classname="${test-class}">
<classpath>
<path location="${jar.dir}/${ant.project.name}.jar"/>
<path location="jna-4.5.1.jar"/>
</classpath>
</java>
</target>
<target name="clean-build" depends="clean,jar"/>
<target name="main" depends="clean,run"/>
</project>