public class Configuration
extends java.lang.Object
ProGuard| Modifier and Type | Field and Description |
|---|---|
java.util.List<java.lang.String> |
adaptClassStrings
A list of String instances specifying a filter for classes whose
string constants are to be adapted, based on corresponding obfuscated
class names.
|
java.util.List<java.lang.String> |
adaptResourceFileContents
A list of String instances specifying a filter for files whose
contents are to be adapted, based on obfuscated class names.
|
java.util.List<java.lang.String> |
adaptResourceFileNames
A list of String instances specifying a filter for files whose
names are to be adapted, based on corresponding obfuscated class names.
|
boolean |
addConfigurationDebugging
Specifies whether to add logging to reflection code, providing suggestions
on the ProGuard configuration.
|
boolean |
allowAccessModification
Specifies whether the access of class members can be modified.
|
boolean |
android
Specifies whether the code should be targeted at the Android platform.
|
java.io.File |
applyMapping
An optional input file for reading an obfuscation mapping.
|
java.util.List<ClassSpecification> |
assumeNoEscapingParameters
A list of
ClassSpecification instances, whose methods are
assumed not to let any reference parameters escape (including 'this'). |
java.util.List<ClassSpecification> |
assumeNoExternalReturnValues
A list of
ClassSpecification instances, whose methods are
assumed not to return any external references (only parameters and new
instances). |
java.util.List<ClassSpecification> |
assumeNoExternalSideEffects
A list of
ClassSpecification instances, whose methods are
assumed to have no side external effects (that is, outside of 'this'). |
java.util.List<ClassSpecification> |
assumeNoSideEffects
A list of
ClassSpecification instances, whose methods are
assumed to have no side effects. |
java.util.List<ClassSpecification> |
assumeValues
A list of
ClassSpecification instances, with fields and methods
that have specified fixed primitive values. |
boolean |
backport
Specifies whether to backporting of class files to another
targetClassVersion shall be enabled.
|
java.net.URL |
classObfuscationDictionary
An optional name of a file containing obfuscated class names.
|
java.util.List<java.lang.String> |
dontCompress
A list of String instances specifying a filter for files that should
not be compressed in output jars.
|
boolean |
dontProcessKotlinMetadata
Specifies not to process Kotlin metadata.
|
java.io.File |
dump
An optional output file for printing out the processed code in a more
or less readable form.
|
boolean |
enableKotlinAsserter
Enables of disables the Kotlin asserter.
|
java.io.File |
extraJar
File to write extra data entries to; instead of writing them to
their respective jars.
|
java.lang.String |
flattenPackageHierarchy
An optional base package if the obfuscated package hierarchy is to be
flattened,
null otherwise. |
boolean |
ignoreWarnings
Specifies whether to ignore any warnings.
|
java.util.List<KeepClassSpecification> |
keep
A list of
KeepClassSpecification instances, whose class names and
class member names are to be kept from shrinking, optimization, and/or
obfuscation. |
java.util.List<java.lang.String> |
keepAttributes
A list of String instances specifying optional attributes to be kept.
|
java.util.List |
keepDirectories
A list of String instances specifying directories to be kept in
the output directories or the output jars.
|
boolean |
keepKotlinMetadata
Specifies whether to process Kotlin metadata or not.
|
java.util.List<java.lang.String> |
keepPackageNames
A list of String instances specifying package names to be kept.
|
boolean |
keepParameterNames
Specifies whether method parameter names and types should be kept for
methods that are not obfuscated.
|
java.util.List<java.lang.String> |
keyAliases
A list of String instances specifying the names of the keys to be used
when signing jars.
|
java.util.List<java.lang.String> |
keyPasswords
A list of String instances specifying the passwords of the keys to be
used when signing jars.
|
java.util.List<java.lang.String> |
keyStorePasswords
A list of String instances specifying the passwords of the key stores
to be used when signing jars.
|
java.util.List<java.io.File> |
keyStores
A list of File instances specifying the key stores to be used when
signing jars.
|
long |
lastModified
Specifies the last modification time of this configuration.
|
ClassPath |
libraryJars
A list of library entries (jars, wars, ears, jmods, zips, and directories).
|
boolean |
mergeInterfacesAggressively
Specifies whether interfaces may be merged aggressively.
|
boolean |
microEdition
Specifies whether the code should be preverified for Java Micro Edition
(creating StackMap attributes) instead of for Java Standard Edition
(creating StackMapTable attributes).
|
java.lang.String |
newSourceFileAttribute
An optional replacement for all SourceFile attributes.
|
java.util.List<java.lang.String> |
note
A list of String instances specifying a filter for the classes for
which not to print notes, if there are noteworthy potential problems.
|
boolean |
obfuscate
Specifies whether the code should be obfuscated.
|
java.net.URL |
obfuscationDictionary
An optional name of a file containing obfuscated class member names.
|
int |
optimizationPasses
Specifies the number of optimization passes.
|
java.util.List<java.lang.String> |
optimizations
A list of String instances specifying the optimizations to be
performed.
|
boolean |
optimize
Specifies whether the code should be optimized.
|
boolean |
optimizeConservatively
Specifies whether conservative optimization should be applied
|
boolean |
overloadAggressively
Specifies whether to apply aggressive name overloading on class members.
|
java.net.URL |
packageObfuscationDictionary
An optional name of a file containing obfuscated package names.
|
boolean |
preverify
Specifies whether the code should be preverified.
|
java.io.File |
printConfiguration
An optional output file for printing out the configuration that ProGuard
is using (with included files and replaced variables).
|
java.io.File |
printMapping
An optional output file for listing the obfuscation mapping.
|
java.io.File |
printSeeds
An optional output file for listing the kept seeds.
|
java.io.File |
printUsage
An optional output file for listing the unused classes and class
members.
|
ClassPath |
programJars
A list of input and output entries (jars, wars, ears, jmods, zips, and directories).
|
java.lang.String |
repackageClasses
An optional base package if the obfuscated classes are to be repackaged
into a single package,
null otherwise. |
boolean |
shrink
Specifies whether the code should be shrunk.
|
boolean |
skipNonPublicLibraryClasses
Specifies whether to skip non-public library classes while reading
library jars.
|
boolean |
skipNonPublicLibraryClassMembers
Specifies whether to skip non-public library class members while reading
library classes.
|
static java.io.File |
STD_OUT |
int |
targetClassVersion
Specifies the version number of the output classes, or 0 if the version
number can be left unchanged.
|
boolean |
useMixedCaseClassNames
Specifies whether obfuscated packages and classes can get mixed-case names.
|
boolean |
useUniqueClassMemberNames
Specifies whether to generate globally unique class member names.
|
boolean |
verbose
Specifies whether to print verbose messages.
|
java.util.List<java.lang.String> |
warn
A list of String instances specifying a filter for the classes for
which not to print warnings, if there are any problems.
|
java.util.List<ClassSpecification> |
whyAreYouKeeping
A list of
ClassSpecification instances, for which an explanation
is to be printed, why they are kept in the shrinking step. |
int |
zipAlign
Specifies the desired alignment of uncompressed data in output jars.
|
| Constructor and Description |
|---|
Configuration() |
public static final java.io.File STD_OUT
public ClassPath programJars
public ClassPath libraryJars
public boolean skipNonPublicLibraryClasses
public boolean skipNonPublicLibraryClassMembers
public java.util.List keepDirectories
null list
means no directories. An empty list means all directories. The directory
names may contain "**", "*", or "?" wildcards, and they may be preceded
by the "!" negator.public java.util.List<java.lang.String> dontCompress
public int zipAlign
public int targetClassVersion
public long lastModified
public java.util.List<KeepClassSpecification> keep
KeepClassSpecification instances, whose class names and
class member names are to be kept from shrinking, optimization, and/or
obfuscation.public java.io.File printSeeds
public boolean shrink
public java.io.File printUsage
public java.util.List<ClassSpecification> whyAreYouKeeping
ClassSpecification instances, for which an explanation
is to be printed, why they are kept in the shrinking step.public boolean optimize
public java.util.List<java.lang.String> optimizations
null list means all optimizations. The
optimization names may contain "*" or "?" wildcards, and they may
be preceded by the "!" negator.public int optimizationPasses
public java.util.List<ClassSpecification> assumeNoSideEffects
ClassSpecification instances, whose methods are
assumed to have no side effects.public java.util.List<ClassSpecification> assumeNoExternalSideEffects
ClassSpecification instances, whose methods are
assumed to have no side external effects (that is, outside of 'this').public java.util.List<ClassSpecification> assumeNoEscapingParameters
ClassSpecification instances, whose methods are
assumed not to let any reference parameters escape (including 'this').public java.util.List<ClassSpecification> assumeNoExternalReturnValues
ClassSpecification instances, whose methods are
assumed not to return any external references (only parameters and new
instances).public java.util.List<ClassSpecification> assumeValues
ClassSpecification instances, with fields and methods
that have specified fixed primitive values.public boolean allowAccessModification
public boolean mergeInterfacesAggressively
public boolean obfuscate
public java.io.File printMapping
public java.io.File applyMapping
public java.net.URL obfuscationDictionary
public java.net.URL classObfuscationDictionary
public java.net.URL packageObfuscationDictionary
public boolean overloadAggressively
public boolean useUniqueClassMemberNames
public boolean useMixedCaseClassNames
public java.util.List<java.lang.String> keepPackageNames
null list means no names. An empty list means all
names. The package names may contain "**", "*", or "?" wildcards, and
they may be preceded by the "!" negator.public java.lang.String flattenPackageHierarchy
null otherwise.public java.lang.String repackageClasses
null otherwise.public java.util.List<java.lang.String> keepAttributes
null list means no attributes. An empty list means all
attributes. The attribute names may contain "*" or "?" wildcards, and
they may be preceded by the "!" negator.public boolean keepParameterNames
public java.lang.String newSourceFileAttribute
public java.util.List<java.lang.String> adaptClassStrings
public java.util.List<java.lang.String> adaptResourceFileNames
public java.util.List<java.lang.String> adaptResourceFileContents
public boolean preverify
public boolean microEdition
public boolean android
public java.util.List<java.io.File> keyStores
public java.util.List<java.lang.String> keyStorePasswords
public java.util.List<java.lang.String> keyAliases
public java.util.List<java.lang.String> keyPasswords
public boolean verbose
public java.util.List<java.lang.String> note
null list means all classes. The class names may contain
"**", "*", or "?" wildcards, and they may be preceded by the "!" negator.public java.util.List<java.lang.String> warn
null list means all classes. The class names may contain
"**", "*", or "?" wildcards, and they may be preceded by the "!" negator.public boolean ignoreWarnings
public java.io.File printConfiguration
public java.io.File dump
public boolean addConfigurationDebugging
public boolean backport
public boolean keepKotlinMetadata
public boolean dontProcessKotlinMetadata
public boolean enableKotlinAsserter
public java.io.File extraJar
ExtraDataEntryNameMap.public boolean optimizeConservatively