diff options
author | Sven Gothel <[email protected]> | 2023-05-23 11:04:42 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-23 11:04:42 +0200 |
commit | d845e8c54ad742dd57a303dcf7fafdfb78a12e33 (patch) | |
tree | 02433f97c3b37a76e7f621584938683798b58158 /build.xml | |
parent | baa2c31d9e4b49f72323e38c7d6fc59affaa29bc (diff) |
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 32 |
1 files changed, 29 insertions, 3 deletions
@@ -1,21 +1,30 @@ -<project name="JSynProject" default="dist" basedir="."> +<project name="JSynProject" default="examples" basedir="."> <description> Build JSyn Java Synthesizer </description> <!-- set global properties for this build --> + <tstamp> + <format property="dstamp" pattern="yyyyMMdd"/> + </tstamp> + <property name="src.dir" location="src/main/java"/> <property name="doc.dir" location="doc"/> <property name="build.dir" location="buildant"/> <property name="dist" location="dist"/> <property name="main-class" value="com.jsyn.apps.AboutJSyn"/> - <property name="jarname" value="jsyn"/> + <property name="jarfile" value="${dist}/lib/jsyn-${dstamp}.jar"/> <property name="java-version" value="1.8"/> + <property name="examples.dir" location="examples/src/main/java"/> + <property name="build.examples.dir" location="buildant-examples"/> + <property name="examples.jarfile" value="${dist}/lib/jsyn-examples-${dstamp}.jar"/> + <target name="init"> <!-- Create the time stamp --> <tstamp/> <!-- Create the necessary directories. --> <mkdir dir="${build.dir}"/> + <mkdir dir="${build.examples.dir}"/> <mkdir dir="${doc.dir}"/> </target> @@ -39,7 +48,7 @@ <mkdir dir="${dist}/lib"/> <!-- Put everything in ${build} into the jsyn-${DSTAMP}.jar file --> - <jar jarfile="${dist}/lib/${jarname}-${DSTAMP}.jar" basedir="${build.dir}"> + <jar jarfile="${jarfile}" basedir="${build.dir}"> <manifest> <attribute name="Main-Class" value="${main-class}"/> </manifest> @@ -59,10 +68,27 @@ <echo message = "=================================================================" /> </target> + <target name="examples" depends="dist" + description="compile the example source " > + <javac target="${java-version}" source="${java-version}" + srcdir="${examples.dir}" destdir="${build.examples.dir}" + debug="${javacdebug}" debuglevel="${javacdebuglevel}"> + <classpath> + <pathelement path="${jarfile}"/> + <pathelement path="libs/jportaudio.jar"/> + <pathelement path="libs/gluegen-rt.jar"/> + <pathelement path="libs/joal.jar"/> + </classpath> + </javac> + <jar jarfile="${examples.jarfile}" basedir="${build.examples.dir}"> + </jar> + </target> + <target name="clean" description="clean up" > <!-- Delete the directories created by ant. --> <delete dir="${build.dir}"/> + <delete dir="${build.examples.dir}"/> <delete dir="${doc.dir}"/> <delete dir="${dist}"/> </target> |