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

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

Issue 386473002: Add dexing for libraries and apks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-apk-first
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | build/android/gyp/write_build_config.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/dex.py
diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py
index dedbcec00f97bd613f28d6ca5e0222b4b882b095..d89c7c21ec1e3f811644d0f75ec76debfdd6642a 100755
--- a/build/android/gyp/dex.py
+++ b/build/android/gyp/dex.py
@@ -18,6 +18,7 @@ def DoDex(options, paths):
dex_cmd = [dx_binary, '--dex', '--force-jumbo', '--output', options.dex_path]
if options.no_locals != '0':
dex_cmd.append('--no-locals')
+
dex_cmd += paths
record_path = '%s.md5.stamp' % options.dex_path
@@ -31,7 +32,11 @@ def DoDex(options, paths):
def main():
+ args = build_utils.ExpandFileArgs(sys.argv[1:])
+
parser = optparse.OptionParser()
+ build_utils.AddDepfileOption(parser)
+
parser.add_option('--android-sdk-tools',
help='Android sdk build tools directory.')
parser.add_option('--dex-path', help='Dex output path.')
@@ -44,11 +49,15 @@ def main():
'is enabled.'))
parser.add_option('--no-locals',
help='Exclude locals list from the dex file.')
+ parser.add_option('--inputs', help='A list of additional input paths.')
parser.add_option('--excluded-paths-file',
help='Path to a file containing a list of paths to exclude '
'from the dex file.')
- options, paths = parser.parse_args()
+ options, paths = parser.parse_args(args)
+
+ required_options = ('android_sdk_tools',)
+ build_utils.CheckOptions(options, parser, required=required_options)
if (options.proguard_enabled == 'true'
and options.configuration_name == 'Release'):
@@ -58,8 +67,17 @@ def main():
exclude_paths = build_utils.ReadJson(options.excluded_paths_file)
paths = [p for p in paths if not p in exclude_paths]
+ if options.inputs:
+ paths += build_utils.ParseGypList(options.inputs)
+
DoDex(options, paths)
+ if options.depfile:
+ build_utils.WriteDepfile(
+ options.depfile,
+ paths + build_utils.GetPythonDependencies())
+
+
if __name__ == '__main__':
sys.exit(main())
« no previous file with comments | « no previous file | build/android/gyp/write_build_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698