mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Added another target for building a debug key signed Android client, and removed the old optimized target from core.
git-svn-id: https://zxing.googlecode.com/svn/trunk@650 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
6f6da9a04c
commit
77f41cce22
|
@ -291,6 +291,22 @@ only when the assets dir exists. -->
|
|||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Package the optimized application and sign it with a debug key. -->
|
||||
<target name="debug-optimized" depends="dex-optimized, package-res">
|
||||
<echo>Packaging ${out-debug-package}, and signing it with a debug key...</echo>
|
||||
<exec executable="${apk-builder}" failonerror="true">
|
||||
<arg value="${out-debug-package-ospath}" />
|
||||
<arg value="-z" />
|
||||
<arg value="${resources-package-ospath}" />
|
||||
<arg value="-f" />
|
||||
<arg value="${intermediate-dex-ospath}" />
|
||||
<arg value="-rf" />
|
||||
<arg value="${srcdir-ospath}" />
|
||||
<arg value="-rj" />
|
||||
<arg value="${external-libs-ospath}" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Package the application without signing it.
|
||||
This allows for the application to be signed later with an official publishing key. -->
|
||||
<target name="release" depends="dex-optimized, package-res">
|
||||
|
|
|
@ -63,35 +63,14 @@
|
|||
</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>
|
||||
|
|
Loading…
Reference in a new issue