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

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

Issue 1408163009: [Android] Enable multidex for debug builds of ChromePublic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gn build 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 | « build/android/gyp/dex.py ('k') | build/android/java_cpp_template.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/main_dex_list.py
diff --git a/build/android/gyp/main_dex_list.py b/build/android/gyp/main_dex_list.py
index 64420019eb905f6e5318837e32ad95ca908ddd83..7f29bfb50d4e235e7c9d3c7bd6ba58548f31a7d8 100755
--- a/build/android/gyp/main_dex_list.py
+++ b/build/android/gyp/main_dex_list.py
@@ -5,6 +5,7 @@
# found in the LICENSE file.
import argparse
+import json
import os
import sys
import tempfile
@@ -27,12 +28,27 @@ def main():
'main dex.')
parser.add_argument('--main-dex-list-path', required=True,
help='The main dex list file to generate.')
+ parser.add_argument('--enabled-configurations',
+ help='The build configurations for which a main dex list'
+ ' should be generated.')
+ parser.add_argument('--configuration-name',
+ help='The current build configuration.')
+ parser.add_argument('--multidex-configuration-path',
+ help='A JSON file containing multidex build '
+ 'configuration.')
parser.add_argument('paths', nargs='+',
help='JARs for which a main dex list should be '
'generated.')
args = parser.parse_args()
+ if args.multidex_configuration_path:
+ with open(args.multidex_configuration_path) as multidex_config_file:
+ multidex_config = json.loads(multidex_config_file.read())
+
+ if not multidex_config.get('enabled', False):
+ return 0
+
with open(args.main_dex_list_path, 'w') as main_dex_list_file:
shrinked_android_jar = os.path.abspath(
@@ -58,7 +74,7 @@ def main():
main_dex_list = ''
try:
- build_utils.CheckOutput(proguard_cmd)
+ build_utils.CheckOutput(proguard_cmd, print_stderr=False)
java_cmd = [
'java', '-cp', dx_jar,
« no previous file with comments | « build/android/gyp/dex.py ('k') | build/android/java_cpp_template.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698