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

Unified Diff: build/android/ant/sdk-targets.xml

Issue 10918149: Use checked in keystore to sign debug apks (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/ant/chrome-debug.keystore ('k') | content/shell/android/java/content_shell_apk.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/ant/sdk-targets.xml
diff --git a/build/android/ant/sdk-targets.xml b/build/android/ant/sdk-targets.xml
index 8f980b418d43b9f540a2772c18cd244618b4f380..b67ff77ab655dece41c72ed24124dd2d1cf8ab30 100644
--- a/build/android/ant/sdk-targets.xml
+++ b/build/android/ant/sdk-targets.xml
@@ -94,4 +94,53 @@
</if>
</do-only-if-manifest-hasCode>
</target>
+
+ <!--
+ For debug builds, the Android SDK tools create a key in ~/.android and sign the build with it.
+ This has caused all kinds of issues. Instead, the debug build should be signed with a key in
+ build/android/ant. The SDK tools do not provide any support for overriding that behavior and so
+ instead one must use the hack below.
+ -->
+
+ <!-- Disables automatic signing. -->
+ <property name="build.is.signing.debug" value="false"/>
+
+ <!-- TODO(cjhopman): Remove this property when all gyp files define the CHROMIUM_SRC property. -->
+ <property name="CHROMIUM_SRC" value="${PRODUCT_DIR}/../.." />
+
+ <property name="key.store" value="${CHROMIUM_SRC}/build/android/ant/chrome-debug.keystore"/>
nilesh 2012/09/10 18:05:04 Please rename the key file to: chromium-apk-debug.
cjhopman 2012/09/10 18:21:41 Done. Also changed passwords and alias to chromium
Isaac (away) 2012/09/10 18:36:08 Did you intend to change this for patch set 2?
+ <property name="key.store.password" value="chrome"/>
+ <property name="key.alias" value="chromedebugkey"/>
+ <property name="key.alias.password" value="chrome"/>
+
+ <!-- SDK tools assume that out.packaged.file is signed and name it "...-unaligned" -->
Isaac (away) 2012/09/10 18:17:25 line length
cjhopman 2012/09/10 18:21:41 We use 100 columns for ant build files.
+ <property name="out.packaged.file"
+ value="${out.dir}/${ant.project.name}-debug-unsigned.apk" />
+ <property name="out.unaligned.file"
+ value="${out.dir}/${ant.project.name}-debug-unaligned.apk" />
+
+ <!-- By default, the SDK tools build only aligns the APK in the -do-debug target. -->
Isaac (away) 2012/09/10 18:17:25 line length
+ <target name="-do-debug" depends="-set-debug-mode, -debug-obfuscation-check, -package, -post-package">
nilesh 2012/09/10 18:05:04 This does not fit in 100 chars. Please add a line
cjhopman 2012/09/10 18:21:41 Done.
+ <!-- only create apk if *not* a library project -->
+ <do-only-if-not-library elseText="Library project: do not create apk..." >
+ <sequential>
+ <!-- Signs the APK -->
+ <echo level="info">Signing final apk...</echo>
+ <signapk
+ input="${out.packaged.file}"
+ output="${out.unaligned.file}"
+ keystore="${key.store}"
+ storepass="${key.store.password}"
+ alias="${key.alias}"
+ keypass="${key.alias.password}"/>
+
+ <!-- Zip aligns the APK -->
+ <zipalign-helper
+ in.package="${out.unaligned.file}"
+ out.package="${out.final.file}" />
+ <echo level="info">Release Package: ${out.final.file}</echo>
+ </sequential>
+ </do-only-if-not-library>
+ <record-build-info />
+ </target>
</project>
« no previous file with comments | « build/android/ant/chrome-debug.keystore ('k') | content/shell/android/java/content_shell_apk.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698