102
102
ProGuard configuration options by XML configuration tags. The resulting
103
103
configuration will be equivalent, but much more verbose and difficult to read,
104
104
as XML goes. The remainder of this page presents the supported tags. For a
105
more extensive discussion of their meaning, please refer to the traditional <a
105
more extensive discussion of their meaning, please consult the traditional <a
106
106
href="usage.html">Usage</a> section. You can find some sample configuration
107
107
files in the <code>examples/ant</code> directory of the ProGuard distribution.
267
267
<dt><a href="usage.html#dontnote"><code><b>note</b></code></a>
268
268
= "<i>boolean</i>"
269
269
(default = true)</dt>
270
<dd>Print notes about potential mistakes or omissions in the
270
<dd>Print notes about potential mistakes or omissions in the configuration.
271
Use the nested element <a href="#dontnote">dontnote</a> for more
272
fine-grained control.</dd>
273
274
<dt><a href="usage.html#dontwarn"><code><b>warn</b></code></a>
274
275
= "<i>boolean</i>"
275
276
(default = true)</dt>
276
<dd>Warn about unresolved references at all.</dd>
277
<dd>Print warnings about unresolved references. Use the nested
278
element <a href="#dontwarn">dontwarn</a> for more fine-grained
279
control. <i>Only use this option if you know what you're doing!</i></dd>
278
281
<dt><a href="usage.html#ignorewarnings"><code><b>ignorewarnings</b></code></a>
279
282
= "<i>boolean</i>"
310
313
<code><b>/></b></code></dt>
311
314
<dd>Specifies the library jars (or wars, ears, zips, or directories).</dd>
316
<dt><a href="usage.html#keepdirectories"><code><b><keepdirectory name = </b></code></a>"<i>directory_name</i>"
317
<code><b>/></b></code><br/>
318
<a href="usage.html#keepdirectories"><code><b><keepdirectories filter = </b></code></a>"<a href="usage.html#filefilters"><i>directory_filter</i></a>"
319
<code><b>/></b></code></dt>
320
<dd>Keep the specified directories in the output jars (or wars, ears, zips, or
313
323
<dt><a href="usage.html#keep"><code><b><keep</b></code></a>
314
324
<a href="#keepmodifier"><i>modifiers</i></a>
315
325
<a href="#classspecification"><i>class_specification</i></a>
375
385
<a href="#classmemberspecification"><i>class_member_specifications</i></a>
376
386
<code><b></assumenosideeffects></b></code></dt>
377
387
<dd>Assume that the specified methods don't have any side effects, while
388
optimizing. <i>Only use this option if you know what you're
391
<dt><a href="usage.html#optimizations"><code><b><optimization name = </b></code></a>"<a href="optimizations.html"><i>optimization_name</i></a>"
392
<code><b>/></b></code><br/>
393
<a href="usage.html#optimizations"><code><b><optimizations filter = </b></code></a>""<a href="optimizations.html"><i>optimization_filter</i></a>"
394
<code><b>/></b></code></dt>
395
<dd>Perform only the specified optimizations.</dd>
397
<dt><a href="usage.html#keeppackagenames"><code><b><keeppackagename name = </b></code></a>"<i>package_name</i>"
398
<code><b>/></b></code><br/>
399
<a href="usage.html#keeppackagenames"><code><b><keeppackagenames filter = </b></code></a>"<a href="usage.html#filters"><i>package_filter</i></a>"
400
<code><b>/></b></code></dt>
401
<dd>Keep the specified package names from being obfuscated. If no name is
402
given, all package names are preserved.</dd>
380
404
<dt><a href="usage.html#keepattributes"><code><b><keepattribute name = </b></code></a>"<i>attribute_name</i>"
405
<code><b>/></b></code><br/>
406
<a href="usage.html#keepattributes"><code><b><keepattributes filter = </b></code></a>"<a href="usage.html#filters"><i>attribute_filter</i></a>"
381
407
<code><b>/></b></code></dt>
382
<dd>Preserve the given optional Java bytecode attribute, with optional
408
<dd>Preserve the specified optional Java bytecode attributes, with optional
383
409
wildcards. If no name is given, all attributes are preserved.</dd>
385
<dt><a href="usage.html#adaptresourcefilenames"><code><b><adaptresourcefilenames filter = </b></code></a>"<a href="usage.html#filters"><i>filter</i></a>"
411
<dt><a href="usage.html#adaptclassstrings"><code><b><adaptclassstrings filter = </b></code></a>"<a href="usage.html#filters"><i>class_filter</i></a>"
412
<code><b>/></b></code></dt>
413
<dd>Adapt string constants in the specified classes, based on the obfuscated
414
names of any corresponding classes.</dd>
416
<dt><a href="usage.html#adaptresourcefilenames"><code><b><adaptresourcefilenames filter = </b></code></a>"<a href="usage.html#filefilters"><i>file_filter</i></a>"
386
417
<code><b>/></b></code></dt>
387
418
<dd>Rename the specified resource files, based on the obfuscated names of the
388
419
corresponding class files.</dd>
390
<dt><a href="usage.html#adaptresourcefilecontents"><code><b><adaptresourcefilecontents filter = </b></code></a>"<a href="usage.html#filters"><i>filter</i></a>"
421
<dt><a href="usage.html#adaptresourcefilecontents"><code><b><adaptresourcefilecontents filter = </b></code></a>"<a href="usage.html#filefilters"><i>file_filter</i></a>"
391
422
<code><b>/></b></code></dt>
392
423
<dd>Update the contents of the specified resource files, based on the
393
obfuscated names of the class files.</dd>
424
obfuscated names of the processed classes.</dd>
426
<dt><a name="dontnote" />
427
<a href="usage.html#dontnote"><code><b><dontnote filter = </b></code></a>"<a href="usage.html#filters"><i>class_filter</i></a>"
428
<code><b>/></b></code></dt>
429
<dd>Don't print notes about classes matching the specified class name
432
<dt><a name="dontwarn" />
433
<a href="usage.html#dontwarn"><code><b><dontwarn filter = </b></code></a>"<a href="usage.html#filters"><i>class_filter</i></a>"
434
<code><b>/></b></code></dt>
435
<dd>Don't print warnings about classes matching the specified class name
436
filter. <i>Only use this option if you know what you're doing!</i></dd>
395
438
<dt><a name="configuration_element"><code><b><configuration refid = </b></code></a>"<i>ref_id</i>"
396
439
<code><b>/></b></code></dt>
436
479
<dt><code><b>filter</b></code> =
437
"<a href="usage.html#filters"><i>filter</i></a>"</dt>
480
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
438
481
<dd>An optional filter for all class file names and resource file names that
439
482
are encountered.</dd>
441
484
<dt><code><b>jarfilter</b></code> =
442
"<a href="usage.html#filters"><i>filter</i></a>"</dt>
485
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
443
486
<dd>An optional filter for all jar names that are encountered.</dd>
445
488
<dt><code><b>warfilter</b></code> =
446
"<a href="usage.html#filters"><i>filter</i></a>"</dt>
489
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
447
490
<dd>An optional filter for all war names that are encountered.</dd>
449
492
<dt><code><b>earfilter</b></code> =
450
"<a href="usage.html#filters"><i>filter</i></a>"</dt>
493
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
451
494
<dd>An optional filter for all ear names that are encountered.</dd>
453
496
<dt><code><b>zipfilter</b></code> =
454
"<a href="usage.html#filters"><i>filter</i></a>"</dt>
497
"<a href="usage.html#filefilters"><i>file_filter</i></a>"</dt>
455
498
<dd>An optional filter for all zip names that are encountered.</dd>