source: core/java/build.xml @ 157b85b

Last change on this file since 157b85b was 157b85b, checked in by zzz <zzz@…>, 11 years ago

pass compiler args down from top build.xml

  • Property mode set to 100644
File size: 4.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="i2p_sdk">
3    <target name="all" depends="clean, build" />
4    <target name="build" depends="builddep, jar" />
5    <target name="builddep">
6        <!-- noop, since the core doesnt depend on anything -->
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" 
15            destdir="./build/obj" >
16        </depend>
17    </target>
18    <!-- only used if not set by a higher build.xml -->
19    <property name="javac.compilerargs" value="" />
20    <target name="compile" depends="depend">
21        <mkdir dir="./build" />
22        <mkdir dir="./build/obj" />
23        <javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" >
24            <compilerarg line="${javac.compilerargs}" />
25        </javac>
26    </target>
27    <target name="compileTest">
28        <mkdir dir="./build" />
29        <mkdir dir="./build/obj" />
30        <javac srcdir="./src:./test" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" >
31            <compilerarg line="${javac.compilerargs}" />
32        </javac>
33    </target>
34    <target name="jar" depends="compile">
35        <jar destfile="./build/i2p.jar" basedir="./build/obj" includes="**/*.class" />
36    </target>
37    <target name="jarTest" depends="compileTest">
38        <jar destfile="./build/i2ptest.jar" basedir="./build/obj" includes="**/*.class" />
39    </target>
40    <target name="javadoc">
41        <mkdir dir="./build" />
42        <mkdir dir="./build/javadoc" />
43        <javadoc sourcepath="./src:./test" destdir="./build/javadoc" packagenames="*" use="true" splitindex="true" windowtitle="I2P SDK" />
44    </target>
45    <target name="test" depends="clean, compileTest">
46        <junit printsummary="on" fork="yes">
47            <classpath>
48                <pathelement path="${classpath}" />
49                <pathelement location="./build/obj" />
50                <pathelement location="../../installer/lib/jbigi/jbigi.jar" />
51                <pathelement path="${ant.home}/lib/clover.jar"/>
52            </classpath>
53            <batchtest>
54                <fileset dir="./test/">
55                    <include name="**/*Test.java" />
56                    <exclude name="**/ElGamalAESEngineTest.java" />
57                    <exclude name="**/StructureTest.java" />
58                </fileset>
59            </batchtest>
60            <formatter type="xml"/>
61        </junit>
62        <mkdir dir="../../reports/" />
63        <mkdir dir="../../reports/core/" />
64        <mkdir dir="../../reports/core/junit/" />
65        <delete>
66            <fileset dir="../../reports/core/junit">
67                <include name="TEST-*.xml"/>
68            </fileset>
69        </delete>
70        <copy todir="../../reports/core/junit">
71            <fileset dir=".">
72                <include name="TEST-*.xml"/>
73            </fileset>
74        </copy>
75        <delete>
76            <fileset dir=".">
77                <include name="TEST-*.xml"/>
78            </fileset>
79        </delete>
80    </target>
81    <target name="junit.report">
82        <junitreport todir="../../reports/core/junit">
83            <fileset dir="../../reports/core/junit">
84                <include name="TEST-*.xml"/>
85            </fileset>
86            <report format="frames" todir="../../reports/core/html/junit"/>
87        </junitreport>
88    </target>
89    <target name="clover.report">
90        <taskdef resource="clovertasks"/>
91        <mkdir dir="../../reports/" />
92        <mkdir dir="../../reports/core" />
93        <mkdir dir="../../reports/core/clover" />
94        <clover-setup initString="../../reports/core/clover/coverage.db"/>
95        <clover-report>
96            <current outfile="../../reports/core/html/clover">
97                <format type="html"/>
98            </current>
99        </clover-report>
100    </target>
101    <target name="test.report" depends="junit.report, clover.report"/>
102    <target name="useclover">
103        <taskdef resource="clovertasks"/>
104        <mkdir dir="../../reports/" />
105        <mkdir dir="../../reports/core/" />
106        <mkdir dir="../../reports/core/clover" />
107        <clover-setup initString="../../reports/core/clover/coverage.db"/>
108    </target>
109    <target name="fulltest" depends="test, junit.report" />
110    <target name="fullclovertest" depends="useclover, test, test.report" />
111    <target name="clean">
112        <delete dir="./build" />
113    </target>
114    <target name="cleandep" depends="clean">
115        <!-- noop, since the core doesn't depend on anything -->
116    </target>
117    <target name="distclean" depends="clean">
118        <!-- noop, since the core doesn't depend on anything -->
119    </target>
120</project>
Note: See TracBrowser for help on using the repository browser.