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

Unified Diff: build/android/gyp/configure_multidex.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/apk_obfuscate.py ('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/configure_multidex.py
diff --git a/build/android/gyp/configure_multidex.py b/build/android/gyp/configure_multidex.py
new file mode 100755
index 0000000000000000000000000000000000000000..aa85d2ffb165546577e8464e20a2134cdd5bf191
--- /dev/null
+++ b/build/android/gyp/configure_multidex.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+import argparse
+import json
+import sys
+
+from util import build_utils
+
+
+def ParseArgs():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--configuration-name', required=True,
+ help='The build CONFIGURATION_NAME.')
+ 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.')
+ parser.add_argument('--multidex-configuration-path', required=True,
+ help='The path to which the multidex configuration JSON '
+ 'should be saved.')
+
+ args = parser.parse_args()
+
+ if args.enabled_configurations:
+ args.enabled_configurations = build_utils.ParseGypList(
+ args.enabled_configurations)
+
+ return args
+
+
+def main():
+ args = ParseArgs()
+
+ multidex_enabled = (
+ (not args.enabled_configurations
+ or args.configuration_name in args.enabled_configurations))
+
+ config = {
+ 'enabled': multidex_enabled,
+ }
+
+ with open(args.multidex_configuration_path, 'w') as f:
+ f.write(json.dumps(config))
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
+
« no previous file with comments | « build/android/gyp/apk_obfuscate.py ('k') | build/android/gyp/dex.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698