source: apps/systray/java/build.xml @ fd91927c

Last change on this file since fd91927c was fd91927c, checked in by zzz <zzz@…>, 9 years ago
  • Build:
    • Add includeAntRuntime=false to all javac targets
    • Add build date, mtn rev, and changed file list to all manifests
    • Add unless=uptodate to all jar and war targets (bob and dtg still todo)
  • Property mode set to 100644
File size: 2.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="systray">
3    <target name="all" depends="clean, build" />
4    <target name="build" depends="builddep, jar" />
5    <target name="builddep">
6        <!-- run from top level build.xml to get dependencies built -->
7    </target>
8    <property name="javac.compilerargs" value="" />
9    <target name="compile">
10        <mkdir dir="./build" />
11        <mkdir dir="./build/obj" />
12        <javac
13            srcdir="./src"
14            debug="true"
15            deprecation="on"
16            source="1.5"
17            target="1.5"
18            destdir="./build/obj"
19            includeAntRuntime="false"
20            includes="**/*.java"
21            classpath="./lib/systray4j.jar:../../../core/java/build/i2p.jar" >
22            <compilerarg line="${javac.compilerargs}" />
23        </javac>
24    </target>
25
26    <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate">
27        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
28            <arg value="list" />
29            <arg value="changed" />
30            <arg value="." />
31        </exec>
32        <!-- \n in an attribute value generates an invalid manifest -->
33        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
34            <arg value="-s" />
35            <arg value="[:space:]" />
36            <arg value="," />
37        </exec>
38        <jar destfile="./build/systray.jar" basedir="./build/obj" includes="**/*.class">
39            <manifest>
40                <attribute name="Main-Class" value="net.i2p.apps.systray.SysTray" />
41                <attribute name="Class-Path" value="systray4j.jar" />
42                <attribute name="Build-Date" value="${build.timestamp}" />
43                <attribute name="Base-Revision" value="${workspace.version}" />
44                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
45            </manifest>
46        </jar>
47    </target>
48
49    <target name="jarUpToDate">
50        <uptodate property="jar.uptodate" targetfile="./build/systray.jar">
51            <srcfiles dir= "build/obj" includes="**/*.class" />
52        </uptodate>
53    </target>
54
55    <target name="javadoc">
56        <mkdir dir="./build" />
57        <mkdir dir="./build/javadoc" />
58        <javadoc
59            sourcepath="./src"
60            classpath="./src:./lib/systray4j.jar"
61            destdir="./build/javadoc"
62            packagenames="*"
63            use="true"
64            access="package"
65            splitindex="true" />
66    </target>
67    <target name="clean">
68        <delete dir="./build" />
69    </target>
70    <target name="cleandep" depends="clean">
71    </target>
72    <target name="distclean" depends="clean">
73    </target>
74</project>
Note: See TracBrowser for help on using the repository browser.