Stay organized with collections
Save and categorize content based on your preferences.
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
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
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AarMetadata\n===========\n\n\n```\ninterface AarMetadata\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDSL object for configuring metadata that is embedded in the AAR.\n\nThis metadata is used by consumers of the AAR to control their behavior.\n\nSummary\n-------\n\n| ### Public properties ||\n|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [minAgpVersion](/reference/tools/gradle-api/8.2/com/android/build/api/dsl/AarMetadata#minAgpVersion()) The minimum Android Gradle Plugin version required by any consuming module. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` | [minCompileSdk](/reference/tools/gradle-api/8.2/com/android/build/api/dsl/AarMetadata#minCompileSdk()) The minimum compileSdkVersion required by any consuming module. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` | [minCompileSdkExtension](/reference/tools/gradle-api/8.2/com/android/build/api/dsl/AarMetadata#minCompileSdkExtension()) The minimum compileSdkExtension required by any consuming module. |\n\nPublic properties\n-----------------\n\n### minAgpVersion\n\n```\nvar minAgpVersion: String?\n```\n\nThe minimum Android Gradle Plugin version required by any consuming module.\n\nFor 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.\n\nminAgpVersion must be a stable AGP version, and it must be formatted with major, minor, and micro values (for example, \"4.0.0\"). \n\n### minCompileSdk\n\n```\nvar minCompileSdk: Int?\n```\n\nThe minimum compileSdkVersion required by any consuming module.\n\nFor 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. \n\n### minCompileSdkExtension\n\n```\nvar minCompileSdkExtension: Int?\n```\n\nThe minimum compileSdkExtension required by any consuming module."]]