Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
93 lines (79 sloc)
2.97 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project name="wattzap" default="linux" basedir="."> | |
<description> | |
Wattzap Ant Build File | |
</description> | |
<!-- set global properties for this build --> | |
<property name="src" location="src"/> | |
<property name="build" location="target/bin"/> | |
<property name="dist" location="target"/> | |
<path id="master-classpath"> | |
<fileset dir="lib"> | |
<include name="*.jar"/> | |
</fileset> | |
<fileset dir="lib/java1.7"> | |
<include name="*.jar"/> | |
</fileset> | |
</path> | |
<property name="classpath" refid="master-classpath"/> | |
<target name="init"> | |
<!-- Create the time stamp --> | |
<tstamp/> | |
<!-- Create the build directory structure used by compile --> | |
<mkdir dir="${build}"/> | |
</target> | |
<target name="compile" depends="init" | |
description="compile the source " > | |
<!-- Compile the java code from ${src} into ${build} --> | |
<javac srcdir="${src}" destdir="${build}" source="1.7" target="1.7" debug="true" debuglevel="lines,vars,source"> | |
<classpath refid="master-classpath"/> | |
</javac> | |
</target> | |
<target name="dist" depends="compile" description="generate the distribution" > | |
<!-- Create the distribution directory --> | |
<mkdir dir="${dist}/lib"/> | |
<jar destfile="${dist}/wattzap/lib/wattzap.jar"> | |
<fileset dir="${build}"> | |
<exclude name="**/*Test.class" /> | |
<exclude name="org/**/*.class" /> | |
</fileset> | |
</jar> | |
<zip destfile="tmp.jar" > | |
<zipfileset src="lib/java1.7/jformica_jsr80.jar" excludes="org/cowboycoders/ant/interfaces/**/*.class" /> | |
<zipfileset dir="${build}" includes="org/cowboycoders/ant/interfaces/**/*.class" /> | |
</zip> | |
<move file="tmp.jar" tofile="lib/java1.7/jformica_jsr80.jar"/> | |
<zip destfile="tmp.jar" > | |
<zipfileset src="lib/usb4java-javax-1.2.0.jar" excludes="org/usb4java/javax/AbstractIrp*.class" /> | |
<zipfileset dir="${build}" includes="org/usb4java/javax/AbstractIrp*.class" /> | |
</zip> | |
<move file="tmp.jar" tofile="lib/usb4java-javax-1.2.0.jar"/> | |
</target> | |
<target name="clean" | |
description="clean up" > | |
<!-- Delete the ${dist} directory trees --> | |
<delete dir="${dist}"/> | |
</target> | |
<target name="linux" description="make Linux release" depends="dist"> | |
<copy todir="${dist}/wattzap/lib"> | |
<fileset dir="lib"> | |
<include name="*.jar"/> | |
</fileset> | |
<fileset dir="lib/java1.7"> | |
<include name="*.jar"/> | |
</fileset> | |
</copy> | |
<copy todir="${dist}/wattzap/lib/org"> | |
<fileset dir="lib/org"/> | |
</copy> | |
<copy todir="${dist}/wattzap/properties"> | |
<fileset dir="properties"/> | |
</copy> | |
<copy todir="${dist}/wattzap/icons"> | |
<fileset dir="icons"/> | |
</copy> | |
<copy file="wattzap.sh" tofile="${dist}/wattzap/wattzap.sh"/> | |
<chmod file="${dist}/wattzap/wattzap.sh" perm="755"/> | |
<tar destfile="${dist}/wattzap.tar" basedir="${dist}/wattzap"/> | |
<gzip destfile="${dist}/wattzap.tar.gz" src="${dist}/wattzap.tar"/> | |
</target> | |
</project> |