Add to result the raw, but parsed, bytes of byte segments in 2D barcodes
[zxing.git] / core / build.xml
index 192b4a7..633d81b 100644 (file)
            optimize="true"
            debug="${generate-debug}"
            deprecation="true"
-           fork="true"/>
+           fork="true">
+      <!-- TODO re-add this package -->
+      <exclude name="com/google/zxing/qrcode/encoder/**"/>
+    </javac>
     <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.
     </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>
 
-  <!-- This target really supports the Android client, where we can't as easily build
-       an optimized .apk directly, and need an optimized library. We have to strip debug info
-       above to appease dex -->
-  <target name="build-optimized" depends="build-no-debug">
-    <move file="core.jar" tofile="temp.jar"/>
-    <java jar="${WTK-home}/bin/proguard.jar" fork="true" failonerror="true">
-      <jvmarg value="-Dmaximum.inlined.code.length=32"/>
-      <arg value="-injars temp.jar"/>
-      <arg value="-outjars core.jar"/>
-      <arg value="-libraryjars ${WTK-home}/lib/cldcapi11.jar"/>
-      <arg value="-keepattributes Exceptions,InnerClasses,Signature,!LocalVariableTable,!LocalVariableTypeTable"/>
-      <arg value="-keep public class com.google.zxing.* { public protected *; }"/>
-      <arg value="-keep public class com.google.zxing.client.result.* { public protected *; }"/>
-      <arg value="-keep public class com.google.zxing.common.* { public protected *; }"/>
-      <arg value="-dontshrink"/>
-      <arg value="-dontobfuscate"/>
-      <arg value="-optimizationpasses 7"/>
-      <arg value="-verbose"/>
-    </java>
-    <delete file="temp.jar"/>
-  </target>
-
-  <target name="dump">
-    <java jar="${WTK-home}/bin/proguard.jar" fork="true">
-      <arg value="-injars core.jar"/>
-      <arg value="-libraryjars ${WTK-home}/lib/cldcapi11.jar"/>
-      <arg value="-dontshrink"/>
-      <arg value="-dontobfuscate"/>
-      <arg value="-dontoptimize"/>
-      <arg value="-dump dump.txt"/>
-    </java>
-  </target>
-
   <target name="build-test" depends="init,build">
     <fail message="Please build 'javase' first">
       <condition>
   </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>
       </assertions>
       <batchtest>
         <fileset dir="test/src">
-          <include name="**/*BlackBox*TestCase.java"/>
-          <exclude name="com/google/zxing/common/AbstractBlackBoxTestCase.java"/>
-          <exclude name="com/google/zxing/common/AbstractNegativeBlackBoxTestCase.java"/>
+          <include name="**/${subdir}/*BlackBox*TestCase.java"/>
+          <exclude name="**/Abstract*.java"/>            
         </fileset>
       </batchtest>
     </junit>
       </assertions>
       <batchtest>
         <fileset dir="test/src">
+          <include name="**/*TestCase.java"/>          
           <exclude name="**/*BlackBox*TestCase.java"/>
+          <exclude name="**/Abstract*.java"/>
         </fileset>
       </batchtest>
     </junit>
     <delete dir="build-test"/>
     <delete file="core.jar"/>
     <delete file="ZXingReader.*"/>
+    <delete file="proguard-dump.txt"/>
   </target>
 
 </project>