Make use of md5_check within finalize_apk.py

This stops the _incremental.apk from being re-finalized over and over during
normal development.

BUG=533442

Review URL: https://codereview.chromium.org/1348533006

Cr-Original-Commit-Position: refs/heads/master@{#350732}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1ed522607cd798f60c6120ed5f97b85e6a233f47
This commit is contained in:
agrieve 2015-09-24 18:15:47 -07:00 коммит произвёл Commit bot
Родитель 6f9f01544a
Коммит 3615c1ee3b
1 изменённых файлов: 23 добавлений и 8 удалений

Просмотреть файл

@ -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.depfile:
build_utils.WriteDepfile(
options.depfile, build_utils.GetPythonDependencies())
if options.load_library_from_zip:
input_paths.append(options.rezip_apk_jar_path)
if options.stamp:
build_utils.Touch(options.stamp)
input_strings = [
options.load_library_from_zip,
options.key_name,
options.key_passwd,
]
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:]))