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

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..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
« 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