2010-05-13 08:44:21 -04:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2010-05-14 07:02:40 -04:00
|
|
|
<project name="libgrowl" default="build">
|
2010-05-13 09:20:49 -04:00
|
|
|
<property name="version" value="0.2" />
|
2010-05-13 08:44:21 -04:00
|
|
|
<property name="build.dir" value="build" />
|
|
|
|
<property name="classes.dir" value="${build.dir}/classes" />
|
|
|
|
<property name="target.dir" value="${build.dir}/dist" />
|
|
|
|
<property name="javadoc.dir" value="${build.dir}/apidocs" />
|
|
|
|
|
|
|
|
<property name="src.java.dir" value="src/java" />
|
|
|
|
<property name="src.native.dir" value="src/native" />
|
|
|
|
<property name="src.resources.dir" value="src/resources" />
|
|
|
|
|
|
|
|
<target name="build-java">
|
|
|
|
<mkdir dir="${classes.dir}" />
|
|
|
|
<javac debug="true" destdir="${classes.dir}" srcdir="${src.java.dir}" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build-headers" depends="build-java">
|
2010-05-13 08:50:44 -04:00
|
|
|
<javah destdir="${src.native.dir}" classpath="${classes.dir}" verbose="true">
|
2010-05-13 08:44:21 -04:00
|
|
|
<class name="info.growl.GrowlNative" />
|
|
|
|
</javah>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build-native">
|
|
|
|
<exec executable="make" dir="${src.native.dir}" failonerror="yes" />
|
|
|
|
|
|
|
|
<copy todir="${target.dir}">
|
|
|
|
<fileset dir="${src.native.dir}" includes="**/*.jnilib" />
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="copy-resources">
|
|
|
|
<copy todir="${classes.dir}">
|
|
|
|
<fileset dir="${src.resources.dir}" includes="**/*" />
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build-jar" depends="build-java, copy-resources">
|
|
|
|
<mkdir dir="${target.dir}" />
|
2010-05-13 09:20:49 -04:00
|
|
|
<jar destfile="${target.dir}/libgrowl-${version}.jar" basedir="${classes.dir}">
|
2010-05-13 08:50:44 -04:00
|
|
|
<include name="info/growl/*.class"/>
|
|
|
|
<manifest>
|
|
|
|
<section name="info/growl/">
|
|
|
|
<attribute name="Implementation-Title" value="Growl Native Wrapper"/>
|
|
|
|
<attribute name="Implementation-Version" value="${version}"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="Michael Stringer"/>
|
|
|
|
</section>
|
|
|
|
</manifest>
|
2010-05-13 08:44:21 -04:00
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build" depends="build-jar,build-headers,build-native" />
|
|
|
|
|
|
|
|
<target name="javadoc" depends="build-jar">
|
|
|
|
<mkdir dir="${javadoc.dir}" />
|
|
|
|
|
|
|
|
<javadoc sourcepath="${src.java.dir}" destdir="${javadoc.dir}"
|
|
|
|
author="yes" header="Growl Java APIs" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete dir="${build.dir}" />
|
|
|
|
<delete>
|
|
|
|
<fileset dir="${src.native.dir}" includes="**/info_growl_*.h" />
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<exec executable="make" dir="${src.native.dir}" failonerror="yes">
|
|
|
|
<arg line="clean" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="run" depends="build">
|
2010-05-13 08:50:44 -04:00
|
|
|
<java classname="info.growl.test.TestGrowl" fork="true" dir="${target.dir}" classpath="${classes.dir}">
|
2010-05-13 08:44:21 -04:00
|
|
|
<jvmarg line="-Djava.library.path=."/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
</project>
|