diff options
Diffstat (limited to 'android/MapsWithMeLite.Samsung/custom_rules.xml')
-rw-r--r-- | android/MapsWithMeLite.Samsung/custom_rules.xml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/android/MapsWithMeLite.Samsung/custom_rules.xml b/android/MapsWithMeLite.Samsung/custom_rules.xml new file mode 100644 index 0000000000..4a82b8d14d --- /dev/null +++ b/android/MapsWithMeLite.Samsung/custom_rules.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="MapsWithMe" default="help"> + + <target name="-set-production-mode" depends="android_rules.-set-mode-check"> + <property name="out.packaged.file" location="${out.absolute.dir}/${ant.project.name}-production-unsigned.apk" /> + <property name="out.final.file" location="${out.absolute.dir}/${ant.project.name}-production.apk" /> + <property name="build.is.mode.set" value="true" /> + + <!-- record the current build target --> + <property name="build.target" value="production" /> + + <property name="build.is.instrumented" value="false" /> + + <!-- production mode is only valid if the manifest does not explicitly + set debuggable to true. default is false. --> + <xpath input="AndroidManifest.xml" expression="/manifest/application/@android:debuggable" + output="build.is.packaging.debug" default="false"/> + + <!-- signing mode: production --> + <property name="build.is.signing.debug" value="false" /> + + <if condition="${build.is.packaging.debug}"> + <then> + <echo>*************************************************</echo> + <echo>**** Android Manifest has debuggable=true ****</echo> + <echo>** Doing DEBUG packaging with PRODUCTION keys ***</echo> + <echo>*************************************************</echo> + </then> + <else> + <!-- property only set in release mode. + Useful for if/unless attributes in target node + when using Ant before 1.8 --> + <property name="build.is.mode.release" value="true"/> + </else> + </if> + </target> + + <target name="production" depends="-exclude-text-drules, -set-production-mode, + android_rules.-release-obfuscation-check, android_rules.-package, android_rules.-release-prompt-for-password, android_rules.-release-nosign" + if="has.keystore" description="Production target - almost the same as release, but with real word config."> + <!-- only create apk if *not* a library project --> + <do-only-if-not-library elseText="Library project: do not create apk..." > + <sequential> + <property name="out.unaligned.file" location="${out.absolute.dir}/${ant.project.name}-production-unaligned.apk" /> + <!-- Signs the APK --> + <echo>Signing final apk...</echo> + <signjar + jar="${out.packaged.file}" + signedjar="${out.unaligned.file}" + keystore="${key.store}" + storepass="${key.store.password}" + alias="${key.alias}" + keypass="${key.alias.password}" + verbose="${verbose}" /> + + <!-- Zip aligns the APK --> + <zipalign-helper in.package="${out.unaligned.file}" + out.package="${out.final.file}" /> + <echo>Release Package: ${out.final.file}</echo> + </sequential> + </do-only-if-not-library> + <record-build-info /> + </target> + + <import file="../common_custom_rules.xml"/> + +</project> + |