Index: build/android/gyp/dex.py |
diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py |
index ccb00c12dc3c0e87373b1fcb4f9776c96914899c..36f87f06569dfeab33c2b58cb9017e51df3a4ee3 100755 |
--- a/build/android/gyp/dex.py |
+++ b/build/android/gyp/dex.py |
@@ -15,6 +15,17 @@ import zipfile |
from util import build_utils |
+def _CheckFilePathEndsWithJar(parser, file_path): |
+ if not file_path.endswith(".jar"): |
+ # dx ignores non .jar files. |
+ 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 +92,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: |
+ _CheckFilePathEndsWithJar(parser, options.proguard_enabled_input_path) |
+ _CheckFilePathsEndWithJar(parser, paths) |
+ |
return options, paths |