Added another target for building a debug key signed Android client, and removed...
[zxing.git] / core / build.xml
index 1d03c53..7a71be8 100644 (file)
     </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>
     <delete dir="build-test"/>
     <delete file="core.jar"/>
     <delete file="ZXingReader.*"/>
+    <delete file="proguard-dump.txt"/>
   </target>
 
 </project>