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

Unified Diff: build/android/gyp/javac.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/jar_toc.py ('k') | build/android/gyp/push_libraries.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/javac.py
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py
index cbd42930258a24edb6f016847416c66415b97e18..c1170048b523b433ae10c3c346581080c4931228 100755
--- a/build/android/gyp/javac.py
+++ b/build/android/gyp/javac.py
@@ -52,12 +52,7 @@ def DoJavac(options):
'-Xlint:deprecation',
] + java_files
- md5_stamp = '%s/javac.md5' % options.output_dir
- md5_checker = md5_check.Md5Checker(
- stamp=md5_stamp,
- inputs=java_files + jar_inputs,
- command=javac_cmd)
- if md5_checker.IsStale():
+ def Compile():
# Delete the classes directory. This ensures that all .class files in the
# output are actually from the input .java files. For example, if a .java
# file is deleted or an inner class is removed, the classes directory should
@@ -66,7 +61,14 @@ def DoJavac(options):
build_utils.MakeDirectory(output_dir)
suppress_output = not options.chromium_code
build_utils.CheckCallDie(javac_cmd, suppress_output=suppress_output)
- md5_checker.Write()
+
+ record_path = '%s/javac.md5.stamp' % options.output_dir
+ md5_check.CallAndRecordIfStale(
+ Compile,
+ record_path=record_path,
+ input_paths=java_files + jar_inputs,
+ input_strings=javac_cmd)
+
def main(argv):
parser = optparse.OptionParser()
« no previous file with comments | « build/android/gyp/jar_toc.py ('k') | build/android/gyp/push_libraries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698