Commit 49325b0c authored by jbudorick's avatar jbudorick Committed by Commit bot

[Android] Change proguard newline handling.

BUG=446638

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

Cr-Commit-Position: refs/heads/master@{#310198}
parent 26b5cbee
......@@ -12,6 +12,9 @@ from pylib import cmd_helper
_PROGUARD_CLASS_RE = re.compile(r'\s*?- Program class:\s*([\S]+)$')
_PROGUARD_SUPERCLASS_RE = re.compile(r'\s*? Superclass:\s*([\S]+)$')
_PROGUARD_SECTION_RE = re.compile(
r'^(?:Interfaces|Constant Pool|Fields|Methods|Class file attributes) '
r'\(count = \d+\):$')
_PROGUARD_METHOD_RE = re.compile(r'\s*?- Method:\s*(\S*)[(].*$')
_PROGUARD_ANNOTATION_RE = re.compile(r'\s*?- Annotation \[L(\S*);\]:$')
_PROGUARD_ANNOTATION_CONST_RE = (
......@@ -78,12 +81,6 @@ def Dump(jar_path):
for line in proguard_output:
line = line.strip('\r\n')
if len(line) == 0:
annotation = None
annotation_has_value = False
method_result = None
continue
m = _PROGUARD_CLASS_RE.match(line)
if m:
class_result = {
......@@ -106,6 +103,13 @@ def Dump(jar_path):
class_result['superclass'] = m.group(1).replace('/', '.')
continue
m = _PROGUARD_SECTION_RE.match(line)
if m:
annotation = None
annotation_has_value = False
method_result = None
continue
m = _PROGUARD_METHOD_RE.match(line)
if m:
method_result = {
......
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