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

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

Issue 1587253003: Revert of [Android] Rework multidex and enable multidex for unit_tests_apk. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: build/android/gyp/configure_multidex.py
diff --git a/build/android/gyp/configure_multidex.py b/build/android/gyp/configure_multidex.py
index 9f3b7360f7132bfd7281f4881f497c620ecc4502..aa85d2ffb165546577e8464e20a2134cdd5bf191 100755
--- a/build/android/gyp/configure_multidex.py
+++ b/build/android/gyp/configure_multidex.py
@@ -6,33 +6,23 @@
import argparse
import json
-import os
import sys
from util import build_utils
-
-
-_GCC_PREPROCESS_PATH = os.path.join(
- os.path.dirname(__file__), 'gcc_preprocess.py')
def ParseArgs():
parser = argparse.ArgumentParser()
parser.add_argument('--configuration-name', required=True,
help='The build CONFIGURATION_NAME.')
- parser.add_argument('--enable-multidex', action='store_true', default=False,
- help='If passed, multidex may be enabled.')
parser.add_argument('--enabled-configurations', default=[],
help='The configuration(s) for which multidex should be '
'enabled. If not specified and --enable-multidex is '
'passed, multidex will be enabled for all '
- 'configurations.')
+ 'configurations.')
parser.add_argument('--multidex-configuration-path', required=True,
help='The path to which the multidex configuration JSON '
'should be saved.')
- parser.add_argument('--multidex-config-java-file', required=True)
- parser.add_argument('--multidex-config-java-stamp', required=True)
- parser.add_argument('--multidex-config-java-template', required=True)
args = parser.parse_args()
@@ -43,41 +33,19 @@
return args
-def _WriteConfigJson(multidex_enabled, multidex_configuration_path):
+def main():
+ args = ParseArgs()
+
+ multidex_enabled = (
+ (not args.enabled_configurations
+ or args.configuration_name in args.enabled_configurations))
+
config = {
'enabled': multidex_enabled,
}
- with open(multidex_configuration_path, 'w') as f:
+ with open(args.multidex_configuration_path, 'w') as f:
f.write(json.dumps(config))
-
-
-def _GenerateMultidexConfigJava(multidex_enabled, args):
- gcc_preprocess_cmd = [
- sys.executable, _GCC_PREPROCESS_PATH,
- '--include-path=',
- '--template', args.multidex_config_java_template,
- '--stamp', args.multidex_config_java_stamp,
- '--output', args.multidex_config_java_file,
- ]
- if multidex_enabled:
- gcc_preprocess_cmd += [
- '--defines', 'ENABLE_MULTIDEX',
- ]
-
- build_utils.CheckOutput(gcc_preprocess_cmd)
-
-
-def main():
- args = ParseArgs()
-
- multidex_enabled = (
- args.enable_multidex
- and (not args.enabled_configurations
- or args.configuration_name in args.enabled_configurations))
-
- _WriteConfigJson(multidex_enabled, args.multidex_configuration_path)
- _GenerateMultidexConfigJava(multidex_enabled, args)
return 0

Powered by Google App Engine
This is Rietveld 408576698