Added top-level build file, removed local copy of JUnit, added test target to core
[zxing.git] / core / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="core" default="build">
3
4   <property file="../build.properties"/>
5
6   <target name="init">
7     <tstamp/>
8   </target>
9
10   <target name="build" depends="init">
11     <mkdir dir="build"/>
12     <javac srcdir="src"
13            destdir="build"
14            source="1.4"
15            target="1.4"
16            bootclasspath="${JDK1.4-home}/jre/lib/rt.jar"
17            optimize="true"
18            debug="true"
19            deprecation="true"
20            fork="true"/>
21     <jar jarfile="core.jar" basedir="build"/>
22   </target>
23
24   <target name="test" depends="init,build">
25     <mkdir dir="build-test"/>
26     <javac srcdir="test/src"
27            destdir="build-test"
28            debug="true"
29            deprecation="true">
30       <classpath>
31         <pathelement location="build"/>
32       </classpath>
33     </javac>
34     <junit printsummary="on" haltonfailure="on" haltonerror="on">
35       <formatter type="plain" usefile="false"/>
36       <classpath>
37         <pathelement location="build"/>
38         <pathelement location="build-test"/>        
39       </classpath>
40       <assertions>
41         <enable/>
42       </assertions>
43       <batchtest>
44         <fileset dir="test/src">
45           <include name="**/*.java"/>
46         </fileset>
47       </batchtest>
48     </junit>
49   </target>
50
51   <target name="clean">
52     <delete dir="build"/>
53     <delete file="core.jar"/>
54   </target>
55
56 </project>