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

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

Issue 14263006: [Android] Refactor md5_check + add tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java_toc
Patch Set: Rebase Created 7 years, 8 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 | « build/android/gyp/dex.py ('k') | build/android/gyp/jar_toc.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/jar.py
diff --git a/build/android/gyp/jar.py b/build/android/gyp/jar.py
index 7618defb9b277568fab007e6934f2f72f1b27a5a..6d4fe12bfa08290fafaec3a5213a807940bd3804 100755
--- a/build/android/gyp/jar.py
+++ b/build/android/gyp/jar.py
@@ -28,15 +28,14 @@ def DoJar(options):
class_files_rel = [os.path.relpath(f, jar_cwd) for f in class_files]
jar_cmd = ['jar', 'cf0', jar_path] + class_files_rel
-
- md5_stamp = '%s.md5' % options.jar_path
- md5_checker = md5_check.Md5Checker(
- stamp=md5_stamp, inputs=class_files, command=jar_cmd)
- if md5_checker.IsStale():
- build_utils.CheckCallDie(jar_cmd, cwd=jar_cwd)
- else:
- build_utils.Touch(options.jar_path)
- md5_checker.Write()
+ record_path = '%s.md5.stamp' % options.jar_path
+ md5_check.CallAndRecordIfStale(
+ lambda: build_utils.CheckCallDie(jar_cmd, cwd=jar_cwd),
+ record_path=record_path,
+ input_paths=class_files,
+ input_strings=jar_cmd)
+
+ build_utils.Touch(options.jar_path)
def main(argv):
« no previous file with comments | « build/android/gyp/dex.py ('k') | build/android/gyp/jar_toc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698