Welcome to mirror list, hosted at ThFree Co, Russian Federation.

custom_rules.xml « MapsWithMeLite.Samsung « android - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4a82b8d14dd76020c388eb7b21bf6591240039ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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>