AarMetadata

interface AarMetadata
com.android.build.api.dsl.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

Properties

abstract String?

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

abstract Int?

The minimum compileSdkVersion required by any consuming module.

Properties

minAgpVersion

abstract var minAgpVersion: String?

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

abstract var minCompileSdk: Int?

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.