Attempt to make encoding detection slightly more accurate -- rule out Shift_JIS in...
[zxing.git] / android / build.xml
index b036492..4d6f0ea 100644 (file)
@@ -14,7 +14,7 @@ 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="BarcodeScanner" default="debug">
+<project name="BarcodeScanner" default="debug-optimized">
   <!-- SDK Locations -->
   <property file="../build.properties"/>
   <property name="sdk-folder" value="${android-home}"/>
@@ -149,7 +149,7 @@ limitations under the License.
   </target>
 
   <!-- Compile this project's .java files into .class files. -->
-  <target name="compile" depends="dirs, resource-src, aidl">
+  <target name="compile" depends="clean, dirs, resource-src, aidl">
     <javac encoding="ascii" target="1.5" debug="true" extdirs=""
            srcdir="."
            destdir="${outdir-classes}"
@@ -160,7 +160,7 @@ limitations under the License.
     </javac>
   </target>
 
-  <target name="compile-release" depends="dirs, resource-src, aidl">
+  <target name="compile-release" depends="clean, dirs, resource-src, aidl">
     <javac encoding="ascii" target="1.5" debug="off" extdirs=""
            srcdir="."
            destdir="${outdir-classes}"
@@ -188,11 +188,11 @@ limitations under the License.
       <arg value="-injars temp.jar"/>
       <arg value="-outjars temp-optimized.jar"/>
       <arg value="-libraryjars ${android-jar}"/>
-      <arg value="-keepattributes Exceptions,InnerClasses,Signature,!LocalVariableTable,!LocalVariableTypeTable"/>
       <arg value="-keep class com.google.zxing.client.android.*Activity"/>
+      <arg value="-keep class com.google.zxing.client.android.ViewfinderView { public * ; }"/>
+      <arg value="-keep class com.google.zxing.client.android.SearchBookContents* { public * ; }"/>
       <arg value="-target 5"/>
       <arg value="-optimizationpasses 7"/>
-      <arg value="-allowaccessmodification"/>
       <arg value="-dontshrink"/>
       <arg value="-dontobfuscate"/>
       <arg value="-dontskipnonpubliclibraryclasses"/>
@@ -325,7 +325,7 @@ only when the assets dir exists. -->
   </target>
 
   <!-- Install the package on the default emulator -->
-  <target name="install" depends="debug">
+  <target name="install">
     <echo>Installing ${out-debug-package} onto default emulator...</echo>
     <exec executable="${adb}" failonerror="true">
       <arg value="install" />
@@ -333,7 +333,7 @@ only when the assets dir exists. -->
     </exec>
   </target>
 
-  <target name="reinstall" depends="debug">
+  <target name="reinstall">
     <echo>Installing ${out-debug-package} onto default emulator...</echo>
     <exec executable="${adb}" failonerror="true">
       <arg value="install" />