aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/jdk/proguard_whitelister.py
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-10-04 22:43:26 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-10-05 12:26:53 +0000
commit567aaf409eeca45310f65f948444ddb08c5c1e16 (patch)
treedf6246026dfc951c2952e14aad471f95a28866ad /tools/jdk/proguard_whitelister.py
parent9c25afe750a937b2152c21a93effc8b9ba82c27b (diff)
Allow adaptresourcefilecontents for proguard configuration, and -s in the directive value.
-- MOS_MIGRATED_REVID=135162267
Diffstat (limited to 'tools/jdk/proguard_whitelister.py')
-rw-r--r--tools/jdk/proguard_whitelister.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/jdk/proguard_whitelister.py b/tools/jdk/proguard_whitelister.py
index 6c95360df7..393807a5af 100644
--- a/tools/jdk/proguard_whitelister.py
+++ b/tools/jdk/proguard_whitelister.py
@@ -37,7 +37,7 @@ class ProguardConfigValidator(object):
"""Validates a proguard config."""
# Must be a tuple for str.startswith()
- _VALID_ARGS = ('keep', 'assumenosideeffects')
+ _VALID_ARGS = ('keep', 'assumenosideeffects', 'adaptresourcefilecontents')
def __init__(self, config_path, outconfig_path):
self._config_path = config_path
@@ -58,7 +58,10 @@ class ProguardConfigValidator(object):
def _Validate(self, config):
"""Checks the config for illegal arguments."""
config = re.sub(PROGUARD_COMMENTS_PATTERN, '', config)
- args = config.split('-')
+ args = re.compile('(?:^-|\n-)').split(config)
+
+ print args
+
invalid_configs = []
for arg in args:
arg = arg.strip()