source: core/java/build.xml @ 4bb902a

Last change on this file since 4bb902a was 4bb902a, checked in by zzz <zzz@…>, 9 years ago
  • FileUtil?: Make it easier to compile without Pack200, or with

Apache Harmony's Pack200, add unzip to main()

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