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

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

Issue 2155363002: 💥 Fail compile if dx has input paths which do not end with .jar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'fix_64bit' into fix_64bit_error Created 4 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 | no next file » | 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 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698