aboutsummaryrefslogtreecommitdiff
path: root/plugins/proguard/spec/refcard.html
blob: 9cb0c72d808a8c79be1761a683d750b07a9824de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<html><body>
 <table>
  <tr>
   <td>@filename</td>
   <td>Short for '-includefilename'. </td>
  </tr>
  <tr>
   <td>-include filename</td>
   <td>Read configuration options from the given file.</td>
  </tr>
  <tr>
   <td>-basedirectory directoryname</td>
   <td>Specifies the base directory for subsequent relative file names.</td>
  </tr>
  <tr>
   <td>-injars class_path</td>
   <td>Specifies the program jars (or wars, ears, zips, or directories).</td>
  </tr>
  <tr>
   <td>-outjars class_path</td>
   <td>Specifies the names of the output jars (or wars, ears, zips, or directories).</td>
  </tr>
  <tr>
   <td>-libraryjars class_path</td>
   <td>Specifies the library jars (or wars, ears, zips, or directories).</td>
  </tr>
  <tr>
   <td>-skipnonpubliclibraryclasses</td>
   <td>Ignore non-public library classes.</td>
  </tr>
  <tr>
   <td>-dontskipnonpubliclibraryclasses</td>
   <td>Don't ignore non-public library classes (the default).</td>
  </tr>
  <tr>
   <td>-dontskipnonpubliclibraryclassmembers</td>
   <td>Don't ignore package visible library class members.</td>
  </tr>
  <tr>
   <td>-keepdirectories [directory_filter]</td>
   <td>Keep the specified directories in the output jars (or wars, ears, zips, or directories).</td>
  </tr>
  <tr>
   <td>-target version</td>
   <td>Set the given version number in the processed classes.</td>
  </tr>
  <tr>
   <td>-forceprocessing</td>
   <td>Process the input, even if the output seems up to date.</td>
  </tr>
  <tr>
   <td>-keep [,modifier,...] class_specification</td>
   <td>Preserve the specified classes and class members.</td>
  </tr>
  <tr>
   <td>-keepclassmembers [,modifier,...] class_specification</td>
   <td>Preserve the specified class members, if their classes are preserved as well.</td>
  </tr>
  <tr>
   <td>-keepclasseswithmembers [,modifier,...] class_specification</td>
   <td>Preserve the specified classes and class members, if all of the specified class members are present.</td>
  </tr>
  <tr>
   <td>-keepnames class_specification</td>
   <td>Preserve the names of the specified classes and class members (if they aren't removed in the shrinking step).</td>
  </tr>
  <tr>
   <td>-keepclassmembernames class_specification</td>
   <td>Preserve the names of the specified class members (if they aren't removed in the shrinking step).</td>
  </tr>
  <tr>
   <td>-keepclasseswithmembernames class_specification</td>
   <td>Preserve the names of the specified classes and class members, if all of the specified class members are present (after the shrinking step).</td>
  </tr>
  <tr>
   <td>-printseeds [filename]</td>
   <td>List classes and class members matched by the various -keep options, to the standard output or to the given file.</td>
  </tr>
  <tr>
   <td>-dontshrink</td>
   <td>Don't shrink the input class files.</td>
  </tr>
  <tr>
   <td>-printusage [filename]</td>
   <td>List dead code of the input class files, to the standard output or to the given file.</td>
  </tr>
  <tr>
   <td>-whyareyoukeeping class_specification</td>
   <td>Print details on why the given classes and class members are being kept in the shrinking step.</td>
  </tr>
  <tr>
   <td>-dontoptimize</td>
   <td>Don't optimize the input class files.</td>
  </tr>
  <tr>
   <td>-optimizations optimization_filter</td>
   <td>The optimizations to be enabled and disabled.</td>
  </tr>
  <tr>
   <td>-optimizationpasses n</td>
   <td>The number of optimization passes to be performed.</td>
  </tr>
  <tr>
   <td>-assumenosideeffects class_specification</td>
   <td>Assume that the specified methods don't have any side effects, while optimizing.</td>
  </tr>
  <tr>
   <td>-allowaccessmodification</td>
   <td>Allow the access modifiers of classes and class members to be modified, while optimizing.</td>
  </tr>
  <tr>
   <td>-mergeinterfacesaggressively</td>
   <td>Allow any interfaces to be merged, while optimizing.</td>
  </tr>
  <tr>
   <td>-dontobfuscate</td>
   <td>Don't obfuscate the input class files.</td>
  </tr>
  <tr>
   <td>-printmapping [filename]</td>
   <td>Print the mapping from old names to new names for classes and class members that have been renamed, to the standard output or to the given file.</td>
  </tr>
  <tr>
   <td>-applymapping filename</td>
   <td>Reuse the given mapping, for incremental obfuscation.</td>
  </tr>
  <tr>
   <td>-obfuscationdictionary filename</td>
   <td>Use the words in the given text file as obfuscated field names and method names.</td>
  </tr>
  <tr>
   <td>-classobfuscationdictionary filename</td>
   <td>Use the words in the given text file as obfuscated class names.</td>
  </tr>
  <tr>
   <td>-packageobfuscationdictionary filename</td>
   <td>Use the words in the given text file as obfuscated package names.</td>
  </tr>
  <tr>
   <td>-overloadaggressively</td>
   <td>Apply aggressive overloading while obfuscating.</td>
  </tr>
  <tr>
   <td>-useuniqueclassmembernames</td>
   <td>Ensure uniform obfuscated class member names for subsequent incremental obfuscation.</td>
  </tr>
  <tr>
   <td>-dontusemixedcaseclassnames</td>
   <td>Don't generate mixed-case class names while obfuscating.</td>
  </tr>
  <tr>
   <td>-keeppackagenames [package_filter]</td>
   <td>Keep the specified package names from being obfuscated.</td>
  </tr>
  <tr>
   <td>-flattenpackagehierarchy [package_name]</td>
   <td>Repackage all packages that are renamed into the single given parent package.</td>
  </tr>
  <tr>
   <td>-repackageclasses [package_name]</td>
   <td>Repackage all class files that are renamed into the single given package.</td>
  </tr>
  <tr>
   <td>-keepattributes [attribute_filter]</td>
   <td>Preserve the given optional attributes; typically Exceptions, InnerClasses, Signature, Deprecated, SourceFile, SourceDir, LineNumberTable, LocalVariableTable, LocalVariableTypeTable, Synthetic, EnclosingMethod, and *Annotation*.</td>
  </tr>
  <tr>
   <td>-keepparameternames</td>
   <td>Keep the parameter names and types of methods that are kept.</td>
  </tr>
  <tr>
   <td>-renamesourcefileattribute [string]</td>
   <td>Put the given constant string in the SourceFile attributes.</td>
  </tr>
  <tr>
   <td>-adaptclassstrings [class_filter]</td>
   <td>Adapt string constants in the specified classes, based on the obfuscated names of any corresponding classes.</td>
  </tr>
  <tr>
   <td>-adaptresourcefilenames [file_filter]</td>
   <td>Rename the specified resource files, based on the obfuscated names of the corresponding class files.</td>
  </tr>
  <tr>
   <td>-adaptresourcefilecontents [file_filter]</td>
   <td>Update the contents of the specified resource files, based on the obfuscated names of the processed classes.</td>
  </tr>
  <tr>
   <td>-dontpreverify</td>
   <td>Don't preverify the processed class files.</td>
  </tr>
  <tr>
   <td>-microedition</td>
   <td>Target the processed class files at Java Micro Edition.</td>
  </tr>
  <tr>
   <td>-verbose</td>
   <td>Write out some more information during processing.</td>
  </tr>
  <tr>
   <td>-dontnote [class_filter]</td>
   <td>Don't print notes about potential mistakes or omissions in the configuration.</td>
  </tr>
  <tr>
   <td>-dontwarn [class_filter]</td>
   <td>Don't warn about unresolved references at all.</td>
  </tr>
  <tr>
   <td>-ignorewarnings</td>
   <td>Print warnings about unresolved references, but continue processing anyhow.</td>
  </tr>
  <tr>
   <td>-printconfiguration [filename]</td>
   <td>Write out the entire configuration in traditional ProGuard style, to the standard output or to the given file.</td>
  </tr>
  <tr>
   <td>-dump [filename]</td>
   <td>Write out the internal structure of the processed class files, to the standard output or to the given file.</td>
  </tr>
 </table>
 <table>
  <tr>
   <td>From being removed or renamed</td>
   <td>From being renamed</td>
  </tr>
  <tr>
   <td>Classes and class members</td>
   <td>-keep</td>
   <td>-keepnames</td>
  </tr>
  <tr>
   <td>Class members only</td>
   <td>-keepclassmembers</td>
   <td>-keepclassmembernames</td>
  </tr>
  <tr>
   <td>Classes and class members, if class members present</td>
   <td>-keepclasseswithmembers</td>
   <td>-keepclasseswithmembernames</td>
  </tr>
 </table>
 <table>
  <tr>
   <td>includedescriptorclasses</td>
   <td>Also keep any classes in the descriptors of specified fields and methods.</td>
  </tr>
  <tr>
   <td>allowshrinking</td>
   <td>Allow the specified entry points to be removed in the shrinking step.</td>
  </tr>
  <tr>
   <td>allowoptimization</td>
   <td>Allow the specified entry points to be modified in the optimization step.</td>
  </tr>
  <tr>
   <td>allowobfuscation</td>
   <td>Allow the specified entry points to be renamed in the obfuscation step.</td>
  </tr>
 </table>
</body></html>