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

Unified Diff: build/android/gyp/dex.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/create_device_library_links.py ('k') | build/android/gyp/jar.py » ('j') | 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 99834c4fe0908ae83fb094ba0206ea16c57dbc53..84a9c63741b816307cee9b8ebee4b2882ccd6e8f 100755
--- a/build/android/gyp/dex.py
+++ b/build/android/gyp/dex.py
@@ -17,14 +17,14 @@ def DoDex(options, paths):
dx_binary = os.path.join(options.android_sdk_root, 'platform-tools', 'dx')
dex_cmd = [dx_binary, '--dex', '--output', options.dex_path] + paths
- md5_stamp = '%s.md5' % options.dex_path
- md5_checker = md5_check.Md5Checker(
- stamp=md5_stamp, inputs=paths, command=dex_cmd)
- if md5_checker.IsStale():
- build_utils.CheckCallDie(dex_cmd, suppress_output=True)
- else:
- build_utils.Touch(options.dex_path)
- md5_checker.Write()
+ record_path = '%s.md5.stamp' % options.dex_path
+ md5_check.CallAndRecordIfStale(
+ lambda: build_utils.CheckCallDie(dex_cmd, suppress_output=True),
+ record_path=record_path,
+ input_paths=paths,
+ input_strings=dex_cmd)
+
+ build_utils.Touch(options.dex_path)
def main(argv):
« no previous file with comments | « build/android/gyp/create_device_library_links.py ('k') | build/android/gyp/jar.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698