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

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

Issue 1348533006: Make use of md5_check within finalize_apk.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@md5-check-with-outputs
Patch Set: rebase Created 5 years, 3 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/finalize_apk.py
diff --git a/build/android/gyp/finalize_apk.py b/build/android/gyp/finalize_apk.py
index 0a8003508b505213b175cad9730611f7a53ff636..a6a1040d3a97fd0d69a1c57e54cb5e4996cafd5d 100755
--- a/build/android/gyp/finalize_apk.py
+++ b/build/android/gyp/finalize_apk.py
@@ -65,7 +65,9 @@ def AlignApk(zipalign_path, unaligned_path, final_path):
build_utils.CheckOutput(align_cmd)
-def main():
+def main(args):
+ args = build_utils.ExpandFileArgs(args)
+
parser = optparse.OptionParser()
build_utils.AddDepfileOption(parser)
@@ -86,14 +88,27 @@ def main():
options, _ = parser.parse_args()
- FinalizeApk(options)
+ input_paths = [
+ options.unsigned_apk_path,
+ options.key_path,
+ ]
+
+ if options.load_library_from_zip:
+ input_paths.append(options.rezip_apk_jar_path)
- if options.depfile:
- build_utils.WriteDepfile(
- options.depfile, build_utils.GetPythonDependencies())
+ input_strings = [
+ options.load_library_from_zip,
+ options.key_name,
+ options.key_passwd,
+ ]
- if options.stamp:
- build_utils.Touch(options.stamp)
+ build_utils.CallAndWriteDepfileIfStale(
+ lambda: FinalizeApk(options),
+ options,
+ record_path=options.unsigned_apk_path + '.finalize.md5.stamp',
+ input_paths=input_paths,
+ input_strings=input_strings,
+ output_paths=[options.final_apk_path])
def FinalizeApk(options):
@@ -129,4 +144,4 @@ def FinalizeApk(options):
if __name__ == '__main__':
- sys.exit(main())
+ sys.exit(main(sys.argv[1:]))
« 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