OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import os | 5 import os |
6 import re | 6 import re |
7 from util import build_utils | 7 from util import build_utils |
8 | 8 |
9 | 9 |
10 class _ProguardOutputFilter(object): | 10 class _ProguardOutputFilter(object): |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 return self._cmd | 97 return self._cmd |
98 assert self._injars is not None | 98 assert self._injars is not None |
99 assert self._outjar is not None | 99 assert self._outjar is not None |
100 assert self._configs is not None | 100 assert self._configs is not None |
101 cmd = [ | 101 cmd = [ |
102 'java', '-jar', self._proguard_jar_path, | 102 'java', '-jar', self._proguard_jar_path, |
103 '-forceprocessing', | 103 '-forceprocessing', |
104 ] | 104 ] |
105 if self._tested_apk_info_path: | 105 if self._tested_apk_info_path: |
106 tested_apk_info = build_utils.ReadJson(self._tested_apk_info_path) | 106 tested_apk_info = build_utils.ReadJson(self._tested_apk_info_path) |
107 self._configs += tested_apk_info['configs'] | |
108 self._injars = [ | 107 self._injars = [ |
109 p for p in self._injars if not p in tested_apk_info['inputs']] | 108 p for p in self._injars if not p in tested_apk_info['inputs']] |
110 if not self._libraries: | 109 if not self._libraries: |
111 self._libraries = [] | 110 self._libraries = [] |
112 self._libraries += tested_apk_info['inputs'] | 111 self._libraries += tested_apk_info['inputs'] |
113 self._mapping = tested_apk_info['mapping'] | 112 self._mapping = tested_apk_info['mapping'] |
114 cmd += [ | |
115 '-dontobfuscate', | |
116 '-dontoptimize', | |
117 '-dontshrink', | |
118 '-dontskipnonpubliclibraryclassmembers', | |
119 ] | |
120 | 113 |
121 if self._mapping: | 114 if self._mapping: |
122 cmd += [ | 115 cmd += [ |
123 '-applymapping', self._mapping, | 116 '-applymapping', self._mapping, |
124 ] | 117 ] |
125 | 118 |
126 if self._libraries: | 119 if self._libraries: |
127 cmd += [ | 120 cmd += [ |
128 '-libraryjars', ':'.join(self._libraries), | 121 '-libraryjars', ':'.join(self._libraries), |
129 ] | 122 ] |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 stderr_filter=stderr_filter) | 180 stderr_filter=stderr_filter) |
188 | 181 |
189 this_info = { | 182 this_info = { |
190 'inputs': self._injars, | 183 'inputs': self._injars, |
191 'configs': self._configs, | 184 'configs': self._configs, |
192 'mapping': self._outjar + '.mapping', | 185 'mapping': self._outjar + '.mapping', |
193 } | 186 } |
194 | 187 |
195 build_utils.WriteJson(this_info, self._outjar + '.info') | 188 build_utils.WriteJson(this_info, self._outjar + '.info') |
196 | 189 |
OLD | NEW |