Use max compression on .zip/.jar files
[zxing.git] / core / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4  Copyright 2007 Google Inc.
5
6  Licensed under the Apache License, Version 2.0 (the "License");
7  you may not use this file except in compliance with the License.
8  You may obtain a copy of the License at
9
10       http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17 -->
18
19 <project name="core" default="build">
20
21   <property file="../build.properties"/>
22
23   <target name="init">
24     <tstamp/>
25     <fail message="Please set 'JDK1.4-classes' in build.properties">
26       <condition>
27         <not>
28           <available file="${JDK1.4-classes}" type="file"/>
29         </not>
30       </condition>
31     </fail>
32   </target>
33
34   <target name="build" depends="init">
35     <mkdir dir="build"/>
36     <javac srcdir="src"
37            destdir="build"
38            source="1.4"
39            target="1.4"
40            bootclasspath="${JDK1.4-classes}"
41            optimize="true"
42            debug="true"
43            deprecation="true"
44            fork="true"/>
45     <jar jarfile="core.jar" basedir="build" level="9"/>
46   </target>
47
48   <target name="test" depends="init,build">
49     <mkdir dir="build-test"/>
50     <javac srcdir="test/src"
51            destdir="build-test"
52            debug="true"
53            deprecation="true">
54       <classpath>
55         <pathelement location="build"/>
56       </classpath>
57     </javac>
58     <junit printsummary="on" haltonfailure="on" haltonerror="on">
59       <formatter type="plain" usefile="false"/>
60       <classpath>
61         <pathelement location="build"/>
62         <pathelement location="build-test"/>        
63       </classpath>
64       <assertions>
65         <enable/>
66       </assertions>
67       <batchtest>
68         <fileset dir="test/src">
69           <include name="**/*.java"/>
70         </fileset>
71       </batchtest>
72     </junit>
73   </target>
74
75   <target name="clean">
76     <delete dir="build"/>
77     <delete dir="build-test"/>    
78     <delete file="core.jar"/>
79   </target>
80
81 </project>