BaseConfigImpl

An object that contain a BuildConfig configuration

Properties

PropertyDescription
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.

Methods

No methods

Script blocks

No script blocks

Property details

List<File> consumerProguardFiles

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.

Map<String, Object> manifestPlaceholders

The manifest placeholders.

See Inject Build Variables into the Manifest.

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.

List<File> proguardFiles

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.