| Index: build/android/gyp/apkbuilder.py
|
| diff --git a/build/android/gyp/apkbuilder.py b/build/android/gyp/apkbuilder.py
|
| index c44173f0f941f21c179ebd68e4bdd4938206a17b..317c3c439a29799b121f6397f0b4f54b001c5b52 100755
|
| --- a/build/android/gyp/apkbuilder.py
|
| +++ b/build/android/gyp/apkbuilder.py
|
| @@ -146,7 +146,12 @@ def main(args):
|
| # ignored by md5_check.
|
| apk.writestr('lib/%s/libplaceholder.so' % options.android_abi, ':-)')
|
| 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')
|
|
|
| shutil.move(tmp_apk, options.output_apk)
|
| finally:
|
|
|