source: apps/streaming/java/build.xml @ 2217d1a

Last change on this file since 2217d1a was 2217d1a, checked in by str4d <str4d@…>, 9 years ago

Moved *streaming and i2ptunnel tests to match convention

  • Property mode set to 100644
File size: 4.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="streaming">
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    <condition property="depend.available">
9        <typefound name="depend" />
10    </condition>
11    <target name="depend" if="depend.available">
12        <depend
13            cache="../../../build"
14            srcdir="./src:./test/junit" 
15            destdir="./build/obj" >
16            <!-- Depend on classes instead of jars where available -->
17            <classpath>
18                <pathelement location="../../../core/java/build/obj" />
19                <pathelement location="../../ministreaming/java/build/obj" />
20            </classpath>
21        </depend>
22    </target>
23    <property name="javac.compilerargs" value="" />
24    <target name="compile" depends="depend">
25        <mkdir dir="./build" />
26        <mkdir dir="./build/obj" />
27        <javac 
28            srcdir="./src" 
29            debug="true" deprecation="on" source="1.5" target="1.5" 
30            includeAntRuntime="false"
31            destdir="./build/obj" 
32            classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar" >
33            <compilerarg line="${javac.compilerargs}" />
34        </javac>
35    </target>
36    <target name="compileTest" depends="compile">
37        <javac 
38            srcdir="./test/junit" 
39            debug="true" deprecation="on" source="1.5" target="1.5" 
40            includeAntRuntime="false"
41            destdir="./build/obj" 
42            classpath="../../../core/java/build/i2p.jar:../../ministreaming/java/build/mstreaming.jar" >
43            <compilerarg line="${javac.compilerargs}" />
44        </javac>
45    </target>
46
47    <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
48        <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
49            <arg value="list" />
50            <arg value="changed" />
51            <arg value="." />
52        </exec>
53        <!-- \n in an attribute value generates an invalid manifest -->
54        <exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
55            <arg value="-s" />
56            <arg value="[:space:]" />
57            <arg value="," />
58        </exec>
59    </target>
60
61    <target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
62        <!-- set if unset -->
63        <property name="workspace.changes.tr" value="" />
64        <jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*.class" >
65            <manifest>
66                <attribute name="Implementation-Version" value="${full.version}" />
67                <attribute name="Built-By" value="${build.built-by}" />
68                <attribute name="Build-Date" value="${build.timestamp}" />
69                <attribute name="Base-Revision" value="${workspace.version}" />
70                <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
71            </manifest>
72        </jar>
73    </target>
74
75    <target name="jarUpToDate">
76        <uptodate property="jar.uptodate" targetfile="build/streaming.jar" >
77            <srcfiles dir= "." includes="build/obj/**/*.class" />
78        </uptodate>
79        <condition property="shouldListChanges" >
80            <and>
81                <not>
82                    <isset property="jar.uptodate" />
83                </not>
84                <isset property="mtn.available" />
85            </and>
86        </condition>
87    </target>
88
89    <target name="jarTest" depends="jar, compileTest">
90        <jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*Test*.class" update="true" />
91    </target>
92    <target name="javadoc">
93        <mkdir dir="./build" />
94        <mkdir dir="./build/javadoc" />
95        <javadoc 
96            sourcepath="./src:../../../core/java/src:../../ministreaming/java/src" destdir="./build/javadoc" 
97            packagenames="*" 
98            use="true" 
99            splitindex="true" 
100            windowtitle="Streaming" />
101    </target>
102    <target name="clean">
103        <delete dir="./build" />
104    </target>
105    <target name="cleandep" depends="clean">
106    </target>
107    <target name="distclean" depends="clean">
108    </target>
109</project>
Note: See TracBrowser for help on using the repository browser.