Made a small performance tweak (about 1% faster).
[zxing.git] / core / build.xml
index bf82802..a042e78 100644 (file)
 
   <property file="../build.properties"/>
 
-  <path id="javame-compile-bootclasspath">
-    <fileset dir="${WTK-home}/lib">
-      <include name="cldcapi11.jar"/>
-    </fileset>
-  </path>
-  <property name="javame-compile-bootclasspath-path" refid="javame-compile-bootclasspath"/>
-
   <target name="init">
     <tstamp/>
   </target>
            destdir="build"
            source="1.2"
            target="1.2"
-           bootclasspath="${javame-compile-bootclasspath-path}"
            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
+      <!-- These entries allow core.jar to function as an OSGi bundle, and also specifies
            additional attributes for compatibility with BugLabs's BUG platform.
            Thanks to David Albert for this change. -->
       <manifest>
     </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"/>
-      <arg value="-dump proguard-dump.txt"/>        
-    </java>
-    <delete file="temp.jar"/>
-  </target>
-
   <target name="build-test" depends="init,build">
     <fail message="Please build 'javase' first">
       <condition>
       <antcall target="test-blackbox-subset">
         <param name="subdir" value="oned"/>
       </antcall>
+      <antcall target="test-blackbox-subset">
+        <param name="subdir" value="pdf417"/>
+      </antcall>
       <antcall target="test-blackbox-subset">
         <param name="subdir" value="qrcode"/>
       </antcall>
       <assertions>
         <enable/>
       </assertions>
+      <jvmarg value="-Xint"/> <!-- works around weird JIT bug in Java 6 -->
       <batchtest>
         <fileset dir="test/src">
           <include name="**/${subdir}/*BlackBox*TestCase.java"/>
+          <exclude name="**/Abstract*.java"/>            
         </fileset>
       </batchtest>
     </junit>
       <assertions>
         <enable/>
       </assertions>
+      <jvmarg value="-Xint"/> <!-- works around weird JIT bug in Java 6 -->
       <batchtest>
         <fileset dir="test/src">
           <include name="**/*TestCase.java"/>          
           <exclude name="**/*BlackBox*TestCase.java"/>
+          <exclude name="**/Abstract*.java"/>
         </fileset>
       </batchtest>
     </junit>