Permalink
Fetching contributors…
Cannot retrieve contributors at this time
89 lines (72 sloc) 2.98 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
jTimeSched - A simple and lightweight time tracking tool
Copyright (C) 2010-2012 Dominik D. Geyer <dominik.geyer@gmail.com>
See LICENSE.txt for details.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!--
Example release of version 1.0 targeting Java 1.6
ant -Dversion=1.0 -Dant.build.javac.target=1.6 -Dant.build.javac.source=1.6
-->
<project name="jTimeSched" default="zip" basedir=".">
<description>jTimeSched build file</description>
<property name="version" value="dev" />
<property name="src" location="src" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<target name="init">
<tstamp/>
<mkdir dir="${build}" />
</target>
<target name="compile" depends="init" description="compile the source">
<javac srcdir="${src}" destdir="${build}" includeantruntime="false" />
</target>
<target name="data" depends="compile" description="copy resource files (integrated in JAR)">
<copy todir="${build}" failonerror="yes">
<fileset dir="${basedir}" includes="data/**" />
</copy>
</target>
<target name="jar" depends="data" description="packs the jar">
<mkdir dir="${dist}" />
<jar jarfile="${dist}/jTimeSched.jar" basedir="${build}" manifest="Manifest.txt" compress="yes">
<manifest>
<section name="de/dominik_geyer/jtimesched/">
<attribute name="Implementation-Version" value="${version}" />
</section>
</manifest>
</jar>
<chmod perm="a+x" file="${dist}/jTimeSched.jar" />
</target>
<target name="zip" depends="jar" description="generate the distribution">
<copy todir="${dist}" failonerror="yes">
<fileset dir="${basedir}" includes="README.md ChangeLog.txt LICENSE.txt" />
<fileset dir="${basedir}/launcher" includes="jTimeSched.sh jTimeSched.exe" />
</copy>
<copy todir="${dist}/appicon" failonerror="yes">
<fileset dir="${basedir}/data/img/appicon" includes="jTimeSched_on_*.png" />
<fileset dir="${basedir}/launcher" includes="jTimeSched.ico" />
</copy>
<chmod perm="a+x" file="${dist}/jTimeSched.sh" />
<chmod perm="a+x" file="${dist}/jTimeSched.jar" />
<exec executable="zip" dir="${dist}" failonerror="yes" description="zipping">
<arg value="-q9R" />
<arg value="jTimeSched-${version}.zip" />
<arg value="*" />
<arg value="-x *.svn" />
</exec>
</target>
<target name="clean" description="clean up">
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
</project>