AarMetadata

Added in 4.2.0

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 properties

String?

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

Int?

The minimum compileSdkVersion required by any consuming module.

Int?

The minimum compileSdkExtension required by any consuming module.

Public properties

minAgpVersion

Added in 7.1.0
var minAgpVersionString?

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").

minCompileSdk

Added in 4.2.0
var minCompileSdkInt?

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.

minCompileSdkExtension

Added in 7.4.1
var minCompileSdkExtensionInt?

The minimum compileSdkExtension required by any consuming module.