diff options
author | 2016-10-04 22:43:26 +0000 | |
---|---|---|
committer | 2016-10-05 12:26:53 +0000 | |
commit | 567aaf409eeca45310f65f948444ddb08c5c1e16 (patch) | |
tree | df6246026dfc951c2952e14aad471f95a28866ad /tools/jdk/proguard_whitelister.py | |
parent | 9c25afe750a937b2152c21a93effc8b9ba82c27b (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.py | 7 |
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() |