Use version when creating manfiest/.jad files
[zxing.git] / build.xml
index 0e4deff..7779c6f 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,30 +1,53 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project name="core" default="build">
 
-  <property name="WTK-home" value="/usr/local/WTK2.5.2"/>
-  <property name="JDK1.4-home" value="/usr/lib/jvm/j2sdk1.4.2_16"/>
+<!--
+ Copyright 2007 Google Inc.
 
-  <target name="init">
-    <tstamp/>
-  </target>
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="ZXing" default="build">
 
-  <target name="build" depends="init">
-    <mkdir dir="build"/>
-    <javac srcdir="src"
-           destdir="build"
-           source="1.4"
-           target="1.4"
-           bootclasspath="${JDK1.4-home}/jre/lib/rt.jar"
-           optimize="true"
-           debug="true"
-           deprecation="true"
-           fork="true"/>
-    <jar jarfile="core.jar" basedir="build"/>
+  <property file="build.properties"/>
+
+  <target name="build">
+    <ant dir="core" target="build"/>
+    <ant dir="javame" target="build"/>
+    <ant dir="core-ext" target="build"/>
+    <ant dir="javase" target="build"/>
   </target>
 
   <target name="clean">
-    <delete dir="build"/>
-    <delete file="core.jar"/>
+    <ant dir="core" target="clean"/>
+    <ant dir="javame" target="clean"/>
+    <ant dir="core-ext" target="clean"/>
+    <ant dir="javase" target="clean"/>
+  </target>
+
+  <target name="release" depends="build,clean">
+    <zip file="ZXing-${version}.zip" level="9">
+      <zipfileset dir="." prefix="zxing-${version}">
+        <include name="COPYING"/>
+        <include name="README"/>
+        <include name="CHANGES"/>
+        <include name="build.xml"/>
+        <include name="build.properties"/>
+        <include name="core/**"/>
+        <include name="javame/**"/>
+        <include name="core-ext/**"/>
+        <include name="javase/**"/>
+      </zipfileset>
+    </zip>
   </target>
 
 </project>