Chromium Code Reviews| Index: build/android/gyp/dex.py |
| diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py |
| index ccb00c12dc3c0e87373b1fcb4f9776c96914899c..3d48878d51e94e924d9bae63e98ba536f4f7a39a 100755 |
| --- a/build/android/gyp/dex.py |
| +++ b/build/android/gyp/dex.py |
| @@ -15,6 +15,16 @@ import zipfile |
| from util import build_utils |
| +def _CheckFilePathEndsWithJar(parser, file_path): |
|
agrieve
2016/07/19 00:00:21
nit: Can you add a comment here saying that we per
|
| + if not file_path.endswith(".jar"): |
| + parser.error("%s does not end in .jar" % file_path) |
| + |
| + |
| +def _CheckFilePathsEndWithJar(parser, file_paths): |
| + for file_path in file_paths: |
| + _CheckFilePathEndsWithJar(parser, file_path) |
| + |
| + |
| def _RemoveUnwantedFilesFromZip(dex_path): |
| iz = zipfile.ZipFile(dex_path, 'r') |
| tmp_dex_path = '%s.tmp.zip' % dex_path |
| @@ -81,9 +91,14 @@ def _ParseArgs(args): |
| if options.inputs: |
| options.inputs = build_utils.ParseGypList(options.inputs) |
| + _CheckFilePathsEndWithJar(parser, options.inputs) |
| if options.excluded_paths: |
| options.excluded_paths = build_utils.ParseGypList(options.excluded_paths) |
| + if (options.proguard_enabled_input_path): |
|
agrieve
2016/07/19 00:00:21
nit: drop the ()s
|
| + _CheckFilePathEndsWithJar(parser, options.proguard_enabled_input_path) |
| + _CheckFilePathsEndWithJar(parser, paths) |
| + |
| return options, paths |