LibraryVariantDimension

interface LibraryVariantDimension : VariantDimension
com.android.build.api.dsl.LibraryVariantDimension

Shared properties between DSL objects that contribute to a library variant.

That is, LibraryBuildType and LibraryProductFlavor and LibraryDefaultConfig.

Summary

Public methods

abstract Unit
aarMetadata(action: AarMetadata.() -> Unit)

Options for configuring AAR metadata.

abstract Unit

Options for configuring AAR metadata.

abstract Any
consumerProguardFile(proguardFile: Any)

Adds a proguard rule file to be included in the published AAR.

abstract Any
consumerProguardFiles(vararg proguardFiles: Any)

Adds proguard rule files to be included in the published AAR.

Inherited functions

Properties

abstract AarMetadata

Options for configuring AAR metadata.

abstract MutableList<File>

ProGuard rule files to be included in the published AAR.

abstract Boolean?

Returns whether multi-dex is enabled.

abstract ApkSigningConfig?

The associated signing config or null if none are set on the variant dimension.

Inherited properties

Public methods

aarMetadata

@Incubating abstract fun aarMetadata(action: AarMetadata.() -> Unit): Unit

Options for configuring AAR metadata.

aarMetadata

@Incubating abstract fun aarMetadata(action: Action<AarMetadata>): Unit

Options for configuring AAR metadata.

consumerProguardFile

@Incubating abstract fun consumerProguardFile(proguardFile: Any): Any

Adds a proguard rule file to be included in the published AAR.

This proguard rule file will then be used by any application project that consume 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.

This method has a return value for legacy reasons.

consumerProguardFiles

@Incubating abstract fun consumerProguardFiles(vararg proguardFiles: Any): Any

Adds proguard rule files to be included in the published AAR.

This proguard rule file will then be used by any application project that consume 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.

This method has a return value for legacy reasons.

Properties

aarMetadata

abstract val aarMetadata: AarMetadata

Options for configuring AAR metadata.

consumerProguardFiles

abstract val consumerProguardFiles: MutableList<File>

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.

multiDexEnabled

abstract var multiDexEnabled: Boolean?

Returns whether multi-dex is enabled.

This can be null if the flag is not set, in which case the default value is used.

signingConfig

abstract var signingConfig: ApkSigningConfig?

The associated signing config or null if none are set on the variant dimension.