AarMetadata

public interface AarMetadata


DSL object for configuring metadata that is embedded in the AAR.

This metadata is used by consumers of the AAR to control their behavior.

Summary

Public methods

abstract String

The minimum Android Gradle Plugin version required by any consuming module.

abstract Integer

The minimum compileSdkVersion required by any consuming module.

abstract Integer

The minimum compileSdkExtension required by any consuming module.

abstract void

The minimum Android Gradle Plugin version required by any consuming module.

abstract void
setMinCompileSdk(Integer minCompileSdk)

The minimum compileSdkVersion required by any consuming module.

abstract void

The minimum compileSdkExtension required by any consuming module.

Public methods

getMinAgpVersion

@Incubating
abstract String getMinAgpVersion()

The minimum Android Gradle Plugin version required by any consuming module.

For example, setting this when the AAR relies on a feature from a new version of AGP will alert consuming projects that they need to update their AGP version to match, rather than getting an ambiguous error from the older version of AGP.

minAgpVersion must be a stable AGP version, and it must be formatted with major, minor, and micro values (for example, "4.0.0").

getMinCompileSdk

abstract Integer getMinCompileSdk()

The minimum compileSdkVersion required by any consuming module.

For example, setting this when the AAR uses an Android resource from a new version of the Android platform will alert consuming projects that they need to update their compileSdk version to match, rather than getting a 'resource not found' error during resource processing.

getMinCompileSdkExtension

@Incubating
abstract Integer getMinCompileSdkExtension()

The minimum compileSdkExtension required by any consuming module.

setMinAgpVersion

@Incubating
abstract void setMinAgpVersion(String minAgpVersion)

The minimum Android Gradle Plugin version required by any consuming module.

For example, setting this when the AAR relies on a feature from a new version of AGP will alert consuming projects that they need to update their AGP version to match, rather than getting an ambiguous error from the older version of AGP.

minAgpVersion must be a stable AGP version, and it must be formatted with major, minor, and micro values (for example, "4.0.0").

setMinCompileSdk

abstract void setMinCompileSdk(Integer minCompileSdk)

The minimum compileSdkVersion required by any consuming module.

For example, setting this when the AAR uses an Android resource from a new version of the Android platform will alert consuming projects that they need to update their compileSdk version to match, rather than getting a 'resource not found' error during resource processing.

setMinCompileSdkExtension

@Incubating
abstract void setMinCompileSdkExtension(Integer minCompileSdkExtension)

The minimum compileSdkExtension required by any consuming module.