summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorjbudorick <jbudorick@chromium.org>2015-01-06 17:02:44 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-07 01:04:25 +0000
commit49325b0cbfafe7d9fb12c6d0023ba6bf4ca2bad9 (patch)
tree27e473d4a071bac87a8b4a4afc0adafa2566fdb3 /build
parent26b5cbeeacd8f0f2bbcaad5f9c519b2446dd3487 (diff)
downloadchromium_src-49325b0cbfafe7d9fb12c6d0023ba6bf4ca2bad9.zip
chromium_src-49325b0cbfafe7d9fb12c6d0023ba6bf4ca2bad9.tar.gz
chromium_src-49325b0cbfafe7d9fb12c6d0023ba6bf4ca2bad9.tar.bz2
[Android] Change proguard newline handling.
BUG=446638 Review URL: https://codereview.chromium.org/824073005 Cr-Commit-Position: refs/heads/master@{#310198}
Diffstat (limited to 'build')
-rw-r--r--build/android/pylib/utils/proguard.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/build/android/pylib/utils/proguard.py b/build/android/pylib/utils/proguard.py
index 02db03e..34ad5c3 100644
--- a/build/android/pylib/utils/proguard.py
+++ b/build/android/pylib/utils/proguard.py
@@ -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 = {