Property | Description |
consumerProguardFiles | ProGuard rule files to be included in the published AAR. |
manifestPlaceholders | The manifest placeholders. |
multiDexEnabled | Whether Multi-Dex is enabled for this variant. |
multiDexKeepFile | Text file that specifies additional classes that will be compiled into the main dex file. |
multiDexKeepProguard | Text file with additional ProGuard rules to be used to determine which classes are compiled into the main dex file. |
proguardFiles | Specifies the ProGuard configuration files that the plugin should use. |
Method | Description |
initWith(that) | Copies all properties from the given build type. |
ProGuard rule files to be included in the published AAR.
These proguard rule files will then be used by any application project that consumes the AAR (if ProGuard is enabled).
This allows AAR to specify shrinking or obfuscation exclude rules.
This is only valid for Library project. This is ignored in Application project.
The manifest placeholders.
Boolean
multiDexEnabled
Whether Multi-Dex is enabled for this variant.
File
multiDexKeepFile
Text file that specifies additional classes that will be compiled into the main dex file.
Classes specified in the file are appended to the main dex classes computed using
aapt
.
If set, the file should contain one class per line, in the following format:
com/example/MyClass.class
File
multiDexKeepProguard
Text file with additional ProGuard rules to be used to determine which classes are compiled into the main dex file.
If set, rules from this file are used in combination with the default rules used by the build system.
Specifies the ProGuard configuration files that the plugin should use.
There are two ProGuard rules files that ship with the Android plugin and are used by default:
- proguard-android.txt
- proguard-android-optimize.txt
proguard-android-optimize.txt
is identical to proguard-android.txt
, exccept with optimizations enabled. You can use
getDefaultProguardFile(String filename)
to return the full path of the files.
DefaultBuildType
initWith
(BuildType
that)
Copies all properties from the given build type.
It can be used like this:
android.buildTypes {
customBuildType {
initWith debug
// customize...
}
}