DBMNG数据库管理与应用

独立思考能力,对于从事科学研究或其他任何工作,都是十分必要的。
当前位置:首页 > 移动应用 > Android

android自动打包 (ant+proguard+签名)





533                    Useful for if/unless attributes in target node 534                    when using Ant before 1.8 -->  535         <property name="build.mode.debug" value="true" /> 536    537         <!-- whether the build is a debug build. always set. --> 538         <property name="build.packaging.debug" value="true" /> 539    540         <!-- signing mode: debug -->  541         <property name="build.signing.debug" value="true" /> 542    543     </target> 544    545      <!-- Builds debug output package, provided all the necessary files are already dexed --> 546     <target name="debug" depends="-set-debug-mode, -compile-tested-if-test, -package-debug-sign" description="Builds the  application and signs it with a debug key."> 54 7          <zipalign-helper in.package="${out.debug.unaligned.file}"out.package="${out.debug.file}" /> 54 8          <echo>Debug Package: ${out.debug.file}</echo> 549     </target> 550    551      <!-- called through target 'release'. Only executed if the keystore and 552               key alias are known but not their password. --> 553      <target name="-release-prompt-for-password" if="has.keystore"unless="has.password"> 554         <!-- Gets passwords -->  555         <echo>Gets passwords ${has.keystore} ${has.password}</echo>  55 6          <input message="Please enter keystore password (store:${key.store}):" addproperty="key.store.password"defaultvalue="5201314.." /> 55 7          <input message="Please enter password for alias '${key.alias}':"addproperty="key.alias.password" defaultvalue="5201314.." /> 
55 8     </target> 559    560      <!-- called through target 'release'. Only executed if there's no 561               keystore/key alias set -->  562     <target name="-release-nosign" unless="has.keystore"> 563          <echo>No key.store and key.alias properties found in build.properties.</echo> 564         <echo>Please sign ${out.unsigned.file} manually</echo> 565         <echo>and run zipalign from the Android SDK tools.</echo> 566     </target> 567    568     <target name="-release-obfuscation-check">  569         <condition property="proguard.enabled" value="true" else="false">  57 0              <and> 571                 <isset property="build.mode.release" /> 572                 <isset property="proguard.config" /> 573             </and> 574         </condition>  575         <if condition="${proguard.enabled}"> 576             <then>  577                  <!-- Secondary dx input (jar files) is empty since all the 578                               jar files will be in the obfuscated jar --> 579                 <path id="out.dex.jar.input.ref" /> 580             </then> 581         </if> 582     </target> 583    584     <target name="-set-release-mode">  585          <!-- release mode is only valid if the manifest does not explicitly 586                    set debuggable to true. default is false. 
5 8 7                     We actually store build.packaging.debug, not build.release --> 588         <xpath input="AndroidManifest.xml"expression="/manifest/application/@android:debuggable"output="build.packaging.debug" default="false" /> 589    590         <!-- signing mode: release -->  591         <property name="build.signing.debug" value="false" /> 592    593         <if condition="${build.packaging.debug}"> 594             <then>  595                 <echo>*************************************************</echo>  596                 <echo>**** Android Manifest has debuggable=true ****</echo>  597                 <echo>**** Doing DEBUG packaging with RELEASE keys ****</echo>  598                 <echo>*************************************************</echo> 599             </then> 600             <else>  601                 <!-- property only set in release mode. 602                               Useful for if/unless attributes in target node 603                              when using Ant before 1.8 --> 604                 <property name="build.mode.release" value="true" />  605             </else> 606         </if> 607     </target> 608    609      <!-- This runs -package-release and -release-nosign first and then runs 610                only if release-sign is true (set in -release-check, 611               called by -release-no-sign)-->  612     <target name="release" depends="-set-release-mode, -release-
obfuscation-check, -package-release, -release-prompt-for-password, -release-nosign"if="has.keystore" description="Builds the application. The generated apk file must be signed before 613                                 it is published."> 614         <!-- Signs the APK -->  6 15          <echo>Signing final apk...</echo> 6 1 6          <signjar jar="${out.unsigned.file}"signedjar="${out.unaligned.file}" keystore="${key.store}"storepass="${key.store.password}" alias="${key.alias}"keypass="${key.alias.password}" verbose="${verbose}" /> 617    618         <!-- Zip aligns the APK -->  61 9          <zipalign-helper in.package="${out.unaligned.file}"out.package="${out.release.file}" /> 62 0          <echo>Release Package: ${out.release.file}</echo> 621           622                   623     </target>  624      <target name="clean" description="Removes output files created by other targets."> 625         <delete dir="${out.absolute.dir}" verbose="${verbose}" /> 626         <delete dir="${gen.absolute.dir}" verbose="${verbose}" /> 627     </target>  628      <target name="deployableAllDevice" description="build all device packet"> 6 2 9          <!-- uid和sdk都是自定义参数,可有可无,有多小个包要打,就在这里copy多小行,修改相关参数,传入到程序里即可 --> 6 3 0          <antcall target="release" inheritAll="true"><param name="uid"value="100" /><param name="sdk" value="91" /></antcall> 6 3 1          <antcall target="release" inheritAll="true"><param name="uid"value="101" /><param name="sdk" value="90" /></antcall> 6          
32  633     </target> 634 </project>   
1234567890ABCDEFGHIJKLMNabcdefghijklmn!@#$%^&&*()_+.一三五七九贰肆陆扒拾,。青玉案元夕东风夜放花千树更吹落星如雨宝马雕车香满路凤箫声动玉壶光转一夜鱼龙舞蛾儿雪柳黄金缕笑语盈盈暗香去众里寻他千百度暮然回首那人却在灯火阑珊处

本站文章内容,部分来自于互联网,若侵犯了您的权益,请致邮件chuanghui423#sohu.com(请将#换为@)联系,我们会尽快核实后删除。
Copyright © 2006-2023 DBMNG.COM All Rights Reserved. Powered by DEVSOARTECH            豫ICP备11002312号-2

豫公网安备 41010502002439号