1
<!doctype html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
1
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
4
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
5
5
<meta http-equiv="content-style-type" content="text/css">
6
6
<link rel="stylesheet" type="text/css" href="style.css">
7
7
<title>Ant Task</title>
8
<script type="text/javascript" language="JavaScript">
10
if (window.self==window.top)
11
window.top.location.replace("../index.html#"+window.location.pathname+window.location.hash);
13
var hash="#"+window.location.pathname.replace(window.top.location.pathname.replace("index.html", ""), "");
14
if (window.top.location.hash!=hash)
15
window.top.location.hash=hash;
91
102
Secondly, the use of <code><</code> and <code>></code> characters would
92
upset the structure of the XML build file. Environment variables are now
93
enclosed by an opening <code>${</code> and a closing <code>}</code>. This
94
syntax also allows you to use Ant properties within the ProGuard
95
configuration. Other occurrences of <code><</code> and <code>></code>
96
have to be encoded as <code>&lt;</code> and <code>&gt;</code>.
103
upset the structure of the XML build file. Environment variables can be
104
specified with the usual Ant style <code>${...}</code>, instead of the ProGuard
105
style <code><...></code>. Other occurrences of <code><</code> and
106
<code>></code> have to be encoded as <code>&lt;</code> and
107
<code>&gt;</code> respectively.
99
110
<h3>3. XML configuration tags</h3>
107
118
files in the <code>examples/ant</code> directory of the ProGuard distribution.
110
<a name="proguard"> </a>
111
<h2>Task Attributes and Nested Elements</h2>
121
<h2><a name="proguard">Task Attributes and Nested Elements</a></h2>
113
123
The <code><b><proguard></b></code> task and the
114
124
<code><b><proguardconfiguration></b></code> task can have the following
120
130
<dt><a name="configuration_attribute"><code><b>configuration</b></code></a>
121
131
= "<i>filename</i>"</dt>
122
132
<dd>Read and merge options from the given ProGuard-style configuration
123
file. Note: for reading XML-style configurations, use the <a
133
file. Note: for reading multiple configuration files or XML-style
134
configurations, use the <a
124
135
href="#configuration_element"><code>configuration</code></a>
125
136
<i>element</i>.</dd>
127
<dt><a href="usage.html#dontskipnonpubliclibraryclasses"><code><b>skipnonpubliclibraryclasses</b></code></a>
138
<dt><a href="usage.html#skipnonpubliclibraryclasses"><code><b>skipnonpubliclibraryclasses</b></code></a>
128
139
= "<i>boolean</i>"
129
(default = true)</dt>
140
(default = false)</dt>
130
141
<dd>Ignore non-public library classes.</dd>
132
143
<dt><a href="usage.html#dontskipnonpubliclibraryclassmembers"><code><b>skipnonpubliclibraryclassmembers</b></code></a>
242
253
<dd>Repackage all class files that are renamed into the single given
256
<dt><a href="usage.html#keepparameternames"><code><b>keepparameternames</b></code></a>
258
(default = false)</dt>
259
<dd>Keep the parameter names and types of methods that are kept.</dd>
245
261
<dt><a href="usage.html#renamesourcefileattribute"><code><b>renamesourcefileattribute</b></code></a>
246
262
= "<i>string</i>"
247
263
(default = none)</dt>
257
273
<dt><a href="usage.html#microedition"><code><b>microedition</b></code></a>
258
274
= "<i>boolean</i>"
259
275
(default = false)</dt>
260
<dd>Targets the processed class files at Java Micro Edition.</dd>
276
<dd>Target the processed class files at Java Micro Edition.</dd>
262
278
<dt><a href="usage.html#verbose"><code><b>verbose</b></code></a>
263
279
= "<i>boolean</i>"
305
321
<dt><a href="usage.html#outjars"><code><b><outjar</b></code></a>
306
322
<a href="#classpath"><i>class_path</i></a>
307
323
<code><b>/></b></code></dt>
308
<dd>Specifies the name of the output jars (or wars, ears, zips, or
324
<dd>Specifies the names of the output jars (or wars, ears, zips, or
309
325
directories).</dd>
311
327
<dt><a href="usage.html#libraryjars"><code><b><libraryjar</b></code></a>
436
452
filter. <i>Only use this option if you know what you're doing!</i></dd>
438
454
<dt><a name="configuration_element"><code><b><configuration refid = </b></code></a>"<i>ref_id</i>"
455
<code><b>/></b></code><br/>
456
<code><b><configuration file = </b></code>"<i>name</i>"
439
457
<code><b>/></b></code></dt>
440
<dd>Includes the configuration specified in the
458
<dd>The first form includes the XML-style configuration specified in a
441
459
<code><proguardconfiguration></code> task (or
442
<code><proguard></code> task) with the attribute <code>id</code> =
443
"<i>ref_id</i>". Note that only the nested elements of this configuration
444
are considered, not the attributes. Also note: for reading ProGuard-style
445
configuration files, use the <a
446
href="#configuration_attribute"><code>configuration</code></a>
447
<i>attribute</i>.</dd>
460
<code><proguard></code> task) with attribute <code>id</code> =
461
"<i>ref_id</i>". Only the nested elements of this configuration are
462
considered, not the attributes.
464
The second form includes the ProGuard-style configuration from the specified
465
file. The element is actually a <code>fileset</code> element and supports
466
all of its attributes and nested elements, including multiple files.
451
<a name="classpath"> </a>
452
<h2>Class Path Attributes and Nested Elements</h2>
471
<h2><a name="classpath">Class Path Attributes and Nested Elements</a></h2>
454
The jar tags are path tags, so they can have any of the path attributes (or
455
nested elements). The most common attributes are:
473
The jar elements are <code>path</code> elements, so they can have any of the
474
standard <code>path</code> attributes and nested elements. The most common
529
<a name="classspecification"> </a>
530
<h2>Class Specification Attributes and Nested Elements</h2>
548
<h2><a name="classspecification">Class Specification Attributes and Nested Elements</a></h2>
532
550
The keep tags can have the following <i>class_specification</i> attributes and
533
551
<i>class_member_specifications</i> nested elements:
538
556
<dd>The optional access modifiers of the class. Any space-separated list of
539
557
"public", "final", and "abstract", with optional negators "!".</dd>
559
<dt><code><b>annotation</b></code> = "<i>annotation_name</i>"</dt>
560
<dd>The optional fully qualified name of an annotation of the class, with
561
optional wildcards.</dd>
541
563
<dt><code><b>type</b></code> = "<i>type</i>"</dt>
542
564
<dd>The optional type of the class: one of "class", "interface", or
543
565
"!interface".</dd>
546
568
<dd>The optional fully qualified name of the class, with optional
571
<dt><code><b>extendsannotation</b></code> = "<i>annotation_name</i>"</dt>
572
<dd>The optional fully qualified name of an annotation of the the class that
573
the specified classes must extend, with optional wildcards.</dd>
549
575
<dt><code><b>extends</b></code> = "<i>class_name</i>"</dt>
550
576
<dd>The optional fully qualified name of the class the specified classes
551
577
must extend, with optional wildcards.</dd>
574
<a name="classmemberspecification"> </a>
575
<h2>Class Member Specification Attributes</h2>
600
<h2><a name="classmemberspecification">Class Member Specification Attributes</a></h2>
577
602
The class member tags can have the following <i>class_member_specification</i>
584
609
"public", "protected", "private", "static", etc., with optional negators
612
<dt><code><b>annotation</b></code> = "<i>annotation_name</i>"</dt>
613
<dd>The optional fully qualified name of an annotation of the class member,
614
with optional wildcards.</dd>
587
616
<dt><code><b>type</b></code> = "<i>type</i>"</dt>
588
617
<dd>The optional fully qualified type of the class member, with optional
589
618
wildcards. Not applicable for constructors, but required for methods for
634
<noscript><div><a target="_top" href="../index.html" class="button">Show menu</a></div></noscript>
606
Copyright © 2002-2009
607
<a href="http://www.graphics.cornell.edu/~eric/">Eric Lafortune</a>.
636
Copyright © 2002-2012
637
<a target="other" href="http://www.lafortune.eu/">Eric Lafortune</a>.