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

Unified Diff: build/android/gyp/apkbuilder.py

Issue 1451483002: [Android] Add gn support for multidex. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +comment in ChromiumMultiDex.template Created 5 years, 1 month 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 | « base/base.gyp ('k') | build/android/gyp/dex.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/apkbuilder.py
diff --git a/build/android/gyp/apkbuilder.py b/build/android/gyp/apkbuilder.py
index 4f947642dcd3a3a63fcaf6925bfedcc0a6a036f5..7e0ce2303dc31f6b7ac3677a325aab3a3ef1b9b5 100755
--- a/build/android/gyp/apkbuilder.py
+++ b/build/android/gyp/apkbuilder.py
@@ -155,7 +155,12 @@ def main(args):
apk.writestr('lib/%s/%s' % (options.android_abi, name), ':)',
zipfile.ZIP_STORED)
if options.dex_file:
- apk.write(options.dex_file, 'classes.dex')
+ if options.dex_file.endswith('.zip'):
+ with zipfile.ZipFile(options.dex_file, 'r') as dex_zip:
+ for dex in (d for d in dex_zip.namelist() if d.endswith('.dex')):
+ apk.writestr(dex, dex_zip.read(dex))
+ else:
+ apk.write(options.dex_file, 'classes.dex')
if options.emma_device_jar:
# Add EMMA Java resources to APK.
« no previous file with comments | « base/base.gyp ('k') | build/android/gyp/dex.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698