Created
January 15, 2009 11:15
-
-
Save jfahrenkrug/47360 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
MODIFIED by Johannes Fahrenkrug (http://springenwerk.com) to make it work on the Mac. | |
Thanks to http://groups.google.com/group/zxing/browse_thread/thread/2ad34ac61ac6ef75/676c804d44d40947?lnk=gst&q=mac#676c804d44d40947 | |
Copyright 2007 ZXing authors | |
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="core" default="build"> | |
<property file="../build.properties"/> | |
<target name="init"> | |
<tstamp/> | |
</target> | |
<target name="compile" depends="init"> | |
<mkdir dir="build"/> | |
<javac srcdir="src" | |
destdir="build" | |
source="1.2" | |
target="1.2" | |
optimize="true" | |
debug="${generate-debug}" | |
deprecation="true" | |
fork="true"/> | |
<jar jarfile="core.jar" basedir="build"> | |
<!-- These entries allow core.jar to function as an OSGi bundle, and also specifices | |
additional attributes for compatibility with BugLabs's BUG platform. | |
Thanks to David Albert for this change. --> | |
<manifest> | |
<attribute name="Bundle-Name" value="ZXing"/> | |
<attribute name="Bundle-Vendor" value="ZXing Project"/> | |
<attribute name="Bundle-SymbolicName" value="ZXing"/> | |
<attribute name="Bundle-Version" value="${version}"/> | |
<attribute name="Export-Package" value="com.google.zxing,com.google.zxing.common,com.google.zxing.client.result"/> | |
<attribute name="Bug-Bundle-Type" value="Application"/> | |
</manifest> | |
</jar> | |
</target> | |
<target name="build" depends="clean"> | |
<antcall target="compile"> | |
<param name="generate-debug" value="true"/> | |
</antcall> | |
</target> | |
<!-- This target is needed for building a core.jar which the Android client can use and run | |
ProGuard on successfully, because dx doesn't like debugging info. --> | |
<target name="build-no-debug" depends="clean"> | |
<antcall target="compile"> | |
<param name="generate-debug" value="false"/> | |
</antcall> | |
</target> | |
<target name="build-test" depends="init,build"> | |
<fail message="Please build 'javase' first"> | |
<condition> | |
<not> | |
<available file="../javase/javase.jar" type="file"/> | |
</not> | |
</condition> | |
</fail> | |
<mkdir dir="build-test"/> | |
<javac srcdir="test/src" | |
destdir="build-test" | |
debug="true" | |
deprecation="true"> | |
<classpath> | |
<pathelement location="core.jar"/> | |
<pathelement location="../javase/javase.jar"/> | |
<pathelement location="lib/junit.jar"/> | |
</classpath> | |
</javac> | |
</target> | |
<target name="test-blackbox" depends="build-test"> | |
<parallel failonany="true"> | |
<antcall target="test-blackbox-subset"> | |
<param name="subdir" value="datamatrix"/> | |
</antcall> | |
<antcall target="test-blackbox-subset"> | |
<param name="subdir" value="negative"/> | |
</antcall> | |
<antcall target="test-blackbox-subset"> | |
<param name="subdir" value="oned"/> | |
</antcall> | |
<antcall target="test-blackbox-subset"> | |
<param name="subdir" value="qrcode"/> | |
</antcall> | |
</parallel> | |
</target> | |
<target name="test-blackbox-subset"> | |
<junit printsummary="on" haltonfailure="on" haltonerror="on" fork="true" dir="."> | |
<formatter type="plain" usefile="false"/> | |
<classpath> | |
<pathelement location="core.jar"/> | |
<pathelement location="build-test"/> | |
<pathelement location="../javase/javase.jar"/> | |
<pathelement location="lib/junit.jar"/> | |
</classpath> | |
<assertions> | |
<enable/> | |
</assertions> | |
<batchtest> | |
<fileset dir="test/src"> | |
<include name="**/${subdir}/*BlackBox*TestCase.java"/> | |
<exclude name="**/Abstract*.java"/> | |
</fileset> | |
</batchtest> | |
</junit> | |
</target> | |
<target name="test-unit" depends="build-test"> | |
<junit printsummary="on" haltonfailure="on" haltonerror="on" fork="true" dir="."> | |
<formatter type="plain" usefile="false"/> | |
<classpath> | |
<pathelement location="core.jar"/> | |
<pathelement location="build-test"/> | |
<pathelement location="../javase/javase.jar"/> | |
<pathelement location="lib/junit.jar"/> | |
</classpath> | |
<assertions> | |
<enable/> | |
</assertions> | |
<batchtest> | |
<fileset dir="test/src"> | |
<include name="**/*TestCase.java"/> | |
<exclude name="**/*BlackBox*TestCase.java"/> | |
<exclude name="**/Abstract*.java"/> | |
</fileset> | |
</batchtest> | |
</junit> | |
</target> | |
<target name="test" depends="test-unit,test-blackbox"/> | |
<target name="clean"> | |
<delete dir="build"/> | |
<delete dir="build-test"/> | |
<delete file="core.jar"/> | |
<delete file="ZXingReader.*"/> | |
<delete file="proguard-dump.txt"/> | |
</target> | |
</project> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment