| 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,
|
|
|