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

Unified Diff: build/android/pylib/utils/proguard.py

Issue 824073005: [Android] Change proguard newline handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/pylib/utils/proguard.py
diff --git a/build/android/pylib/utils/proguard.py b/build/android/pylib/utils/proguard.py
index 02db03e27e897dee60ad6a4cf28bf53253d7923f..34ad5c36316d8672f85c6c8028e7f078013a3487 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 = {
« 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