Commit 20e82420 authored by newt's avatar newt Committed by Commit bot

Silence uninteresting proguard output.

ProGuard outputs boring stuff to stdout (proguard version, jar path,
etc) as well as interesting stuff (notes, warnings, etc). If stdout is
entirely boring, this method suppresses the output.

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

Cr-Commit-Position: refs/heads/master@{#319183}
parent e1b73c98
......@@ -28,7 +28,31 @@ def DoProguard(options):
'-outjars', outjars,
'-libraryjars', libraryjars,
'@' + options.proguard_config]
build_utils.CheckOutput(proguard_cmd, print_stdout=True)
build_utils.CheckOutput(proguard_cmd, print_stdout=True,
stdout_filter=FilterProguardOutput)
def FilterProguardOutput(output):
'''ProGuard outputs boring stuff to stdout (proguard version, jar path, etc)
as well as interesting stuff (notes, warnings, etc). If stdout is entirely
boring, this method suppresses the output.
'''
ignore_patterns = [
'ProGuard, version ',
'Reading program jar [',
'Reading library jar [',
'Preparing output jar [',
' Copying resources from program jar [',
]
for line in output.splitlines():
for pattern in ignore_patterns:
if line.startswith(pattern):
break
else:
# line doesn't match any of the patterns; it's probably something worth
# printing out.
return output
return ''
def main(args):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment