Safer check for Build SDK; restrict Behold II workaround to Cupcake, per Samsung
[zxing.git] / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4  Copyright 2007 ZXing authors
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="ZXing" default="build">
20
21   <property file="build.properties"/>
22
23   <target name="build">
24     <ant dir="core" target="build"/>
25     <ant dir="javame" target="build"/>
26     <ant dir="javase" target="build"/>
27     <ant dir="android" target="compile"/>
28     <ant dir="androidtest" target="compile"/>
29     <ant dir="android-integration" target="build"/>
30     <!--<ant dir="zxingorg" target="build"/>-->
31   </target>
32
33   <target name="buildwithoutj2me">
34     <ant dir="core" target="build"/>
35     <ant dir="javase" target="build"/>
36   </target>
37
38   <target name="clean">
39     <ant dir="core" target="clean"/>
40     <ant dir="javame" target="clean"/>
41     <ant dir="javase" target="clean"/>
42     <ant dir="android" target="clean"/>
43     <ant dir="androidtest" target="clean"/>
44     <ant dir="android-integration" target="clean"/>
45     <ant dir="zxingorg" target="clean"/>
46     <delete dir="docs/javadoc"/>
47   </target>
48
49   <target name="test">
50     <ant dir="core" target="test"/>
51   </target>
52
53   <target name="release" depends="build,clean,javadoc">
54     <zip file="ZXing-${version}.zip">
55       <zipfileset dir="." prefix="zxing-${version}">
56         <exclude name="**/.*"/> <!-- exclude hidden files -->
57         <exclude name="**/.svn"/>
58         <exclude name="**/.iml"/>
59         <include name="AUTHORS"/>
60         <include name="COPYING"/>
61         <include name="README"/>
62         <include name="CHANGES"/>
63         <include name="build.xml"/>
64         <include name="build.properties"/>
65         <include name="actionscript/**"/>
66         <include name="android/**"/>
67         <include name="android-integration/**"/>
68         <include name="androidtest/**"/>
69         <include name="bug/**"/>
70         <exclude name="bug/lib/com.buglabs*"/> <!-- Cannot distributed GPLed libraries -->
71         <include name="core/**"/>
72         <include name="cpp/**"/>
73         <include name="iphone/**"/>
74         <include name="javame/**"/>
75         <include name="javase/**"/>
76         <include name="rim/**"/>
77         <include name="docs/**"/>
78         <include name="zxing.appspot.com/**"/>
79         <include name="zxingorg/**"/>
80         <exclude name="zxingorg/secrets.properties"/>
81       </zipfileset>
82     </zip>
83   </target>
84
85   <target name="javadoc">
86     <mkdir dir="docs/javadoc"/>
87     <javadoc destdir="docs/javadoc"
88              useexternalfile="true"
89              footer="&lt;script type=&quot;text/javascript&quot;&gt; var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ?  &quot;https://ssl.&quot; : &quot;http://www.&quot;); document.write(unescape(&quot;%3Cscript src='&quot; + gaJsHost + &quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;)); &lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; var pageTracker = _gat._getTracker(&quot;UA-788492-5&quot;); pageTracker._initData(); pageTracker._trackPageview(); &lt;/script&gt;">
90       <sourcepath>
91         <pathelement location="android/src"/>
92         <pathelement location="android/gen"/>        
93         <pathelement location="core/src"/>
94         <pathelement location="javame/src"/>
95         <pathelement location="javase/src"/>
96         <pathelement location="zxingorg/src"/>
97       </sourcepath>
98       <classpath>
99         <!-- These are used with WTK 2.5.x -->
100         <!--
101         <pathelement location="${WTK-home}/lib/cldcapi11.jar"/>
102         <pathelement location="${WTK-home}/lib/midpapi20.jar"/>
103         <pathelement location="${WTK-home}/lib/mmapi.jar"/>
104         <pathelement location="${WTK-home}/lib/jsr234.jar"/>
105         -->
106         <pathelement location="${WTK-home}/lib/cldc_1.1.jar"/>
107         <pathelement location="${WTK-home}/lib/midp_2.0.jar"/>
108         <pathelement location="${WTK-home}/lib/jsr135_1.2.jar"/>
109         <pathelement location="${WTK-home}/lib/jsr234_1.0.jar"/>
110         <pathelement location="${android-home}/platforms/android-1.5/android.jar"/>
111         <pathelement location="${tomcat-home}/lib/servlet-api.jar"/>
112         <fileset dir="zxingorg/web/WEB-INF/lib">
113           <include name="*.jar"/>
114         </fileset>
115       </classpath>
116     </javadoc>
117   </target>
118
119 </project>