| 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())
|
|
|