Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Side by Side Diff: build/android/ant/apk-package.xml

Issue 12963009: Split apk-build.xml into 3 steps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/ant/apk-compile.xml ('k') | build/android/ant/chromium-apk.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (C) 2005-2008 The Android Open Source Project
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 -->
17
18 <project default="-do-sign">
19 <property name="verbose" value="false" />
20 <property name="out.dir" location="${OUT_DIR}" />
21 <!-- Output directories -->
22 <property name="out.dir" value="bin" />
23 <property name="out.absolute.dir" location="${out.dir}" />
24 <property name="out.res.absolute.dir" location="${out.dir}/res" />
25 <property name="out.manifest.abs.file" location="${out.dir}/AndroidManifest.xm l" />
26
27 <!-- tools location -->
28 <property name="sdk.dir" location="${ANDROID_SDK_ROOT}"/>
29 <property name="target" value="android-${ANDROID_SDK_VERSION}"/>
30 <property name="project.target.android.jar" location="${ANDROID_SDK_JAR}" />
31 <property name="android.tools.dir" location="${sdk.dir}/tools" />
32 <property name="android.platform.tools.dir" location="${sdk.dir}/platform-tool s" />
33
34 <!-- jar file from where the tasks are loaded -->
35 <path id="android.antlibs">
36 <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
37 </path>
38
39 <!-- Custom tasks -->
40 <taskdef resource="anttasks.properties" classpathref="android.antlibs" />
41
42 <condition property="build.target" value="release" else="debug">
43 <equals arg1="${CONFIGURATION_NAME}" arg2="Release" />
44 </condition>
45 <condition property="build.is.packaging.debug" value="true" else="false">
46 <equals arg1="build.target" arg2="debug" />
47 </condition>
48
49
50 <!-- Set the output directory for the final apk to the ${apks.dir}. -->
51 <property name="out.final.file" location="${APKS_DIR}/${APK_NAME}.apk" />
52
53 <!-- Disables automatic signing. -->
54 <property name="build.is.signing.debug" value="false"/>
55
56 <!-- SDK tools assume that out.packaged.file is signed and name it "...-unalig ned" -->
57 <property name="out.packaged.file" value="${out.dir}/${APK_NAME}-unsigned.apk" />
58 <property name="out.unaligned.file" value="${out.dir}/${APK_NAME}-unaligned.ap k" />
59
60 <property name="resource.dir" value="${RESOURCE_DIR}"/>
61 <property name="resource.absolute.dir" location="${resource.dir}"/>
62
63 <property name="asset.dir" value="${ASSET_DIR}" />
64 <property name="asset.absolute.dir" location="${asset.dir}" />
65
66 <property name="native.libs.absolute.dir" location="${out.dir}/libs" />
67
68 <property name="aapt" location="${android.platform.tools.dir}/aapt" />
69
70 <target name="-crunch">
71 <!-- Updates the pre-processed PNG cache -->
72 <exec executable="${aapt}" taskName="crunch">
73 <arg value="crunch" />
74 <arg value="-v" />
75 <arg value="-S" />
76 <arg path="${resource.absolute.dir}" />
77 <arg value="-C" />
78 <arg path="${out.res.absolute.dir}" />
79 </exec>
80 </target>
81
82 <property name="version.code" value="${APP_MANIFEST_VERSION_CODE}"/>
83 <property name="version.name" value="${APP_MANIFEST_VERSION_NAME}"/>
84
85 <property name="aapt.resource.filter" value="" />
86 <!-- 'aapt.ignore.assets' is the list of file patterns to ignore under /res an d /assets.
87 Default is "!.svn:!.git:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:* ~"
88
89 Overall patterns syntax is:
90 [!][<dir>|<file>][*suffix-match|prefix-match*|full-match]:more:patter ns...
91
92 - The first character flag ! avoids printing a warning.
93 - Pattern can have the flag "<dir>" to match only directories
94 or "<file>" to match only files. Default is to match both.
95 - Match is not case-sensitive.
96 -->
97 <property name="aapt.ignore.assets" value="" />
98
99 <!--
100 Include additional resource folders in the apk, e.g. content/.../res. We
101 list the res folders in project.library.res.folder.path and the
102 corresponding java packages in project.library.packages, which must be
103 semicolon-delimited while ADDITIONAL_RES_PACKAGES is space-delimited, henc e
104 the javascript task.
105 -->
106 <path id="project.library.res.folder.path">
107 <filelist files="${ADDITIONAL_RES_DIRS}"/>
108 </path>
109 <path id="project.library.bin.r.file.path">
110 <filelist files="${ADDITIONAL_R_TEXT_FILES}"/>
111 </path>
112 <script language="javascript">
113 var before = project.getProperty("ADDITIONAL_RES_PACKAGES");
114 project.setProperty("project.library.packages", before.replaceAll(" ", ";")) ;
115 </script>
116
117 <property name="build.packaging.nocrunch" value="true" />
118
119 <!-- Intermediate files -->
120 <property name="resource.package.file.name" value="${APK_NAME}.ap_" />
121
122 <target name="-package-resources" depends="-crunch">
123 <aapt
124 executable="${aapt}"
125 command="package"
126 versioncode="${version.code}"
127 versionname="${version.name}"
128 debug="${build.is.packaging.debug}"
129 manifest="${out.manifest.abs.file}"
130 assets="${asset.absolute.dir}"
131 androidjar="${project.target.android.jar}"
132 apkfolder="${out.absolute.dir}"
133 nocrunch="${build.packaging.nocrunch}"
134 resourcefilename="${resource.package.file.name}"
135 resourcefilter="${aapt.resource.filter}"
136 libraryResFolderPathRefid="project.library.res.folder.path"
137 libraryPackagesRefid="project.library.packages"
138 libraryRFileRefid="project.library.bin.r.file.path"
139 previousBuildType=""
140 buildType="${build.target}"
141 ignoreAssets="${aapt.ignore.assets}">
142 <res path="${out.res.absolute.dir}" />
143 <res path="${resource.absolute.dir}" />
144 <!-- <nocompress /> forces no compression on any files in assets or res/ra w -->
145 <!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
146 </aapt>
147 </target>
148
149 <property name="dex.file.name" value="classes.dex" />
150 <property name="intermediate.dex.file" location="${out.absolute.dir}/${dex.fil e.name}" />
151 <property name="source.dir" value="${SOURCE_DIR}" />
152 <property name="source.absolute.dir" location="${source.dir}" />
153
154
155 <!-- Packages the application. -->
156 <target name="-package" depends="-package-resources">
157 <apkbuilder
158 outfolder="${out.absolute.dir}"
159 resourcefile="${resource.package.file.name}"
160 apkfilepath="${out.packaged.file}"
161 debugpackaging="${build.is.packaging.debug}"
162 debugsigning="${build.is.signing.debug}"
163 verbose="${verbose}"
164 hascode="true"
165 previousBuildType="/"
166 buildType="${build.is.packaging.debug}/${build.is.signing.debug}">
167 <dex path="${intermediate.dex.file}"/>
168 <sourcefolder path="${source.absolute.dir}"/>
169 <nativefolder path="${native.libs.absolute.dir}" />
170 </apkbuilder>
171 </target>
172
173
174
175 <property name="key.store" value="${KEYSTORE_PATH}"/>
176 <property name="key.store.password" value="chromium"/>
177 <property name="key.alias" value="chromiumdebugkey"/>
178 <property name="key.alias.password" value="chromium"/>
179 <property name="zipalign" location="${android.tools.dir}/zipalign" />
180
181 <!-- Signs and zipaligns the apk. -->
182 <target name="-do-sign" depends="-package">
183 <sequential>
184 <echo level="info">Signing final apk...</echo>
185 <signapk
186 input="${out.packaged.file}"
187 output="${out.unaligned.file}"
188 keystore="${key.store}"
189 storepass="${key.store.password}"
190 alias="${key.alias}"
191 keypass="${key.alias.password}" />
192
193 <zipalign
194 executable="${zipalign}"
195 input="${out.unaligned.file}"
196 output="${out.final.file}"
197 verbose="${verbose}" />
198 <echo level="info">Release Package: ${out.final.file}</echo>
199 </sequential>
200 </target>
201 </project>
OLDNEW
« no previous file with comments | « build/android/ant/apk-compile.xml ('k') | build/android/ant/chromium-apk.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698