# AarMetadata

[View Source](https://cs.android.com/search?q=file:com/android/build/api/variant/AarMetadata.kt+class:com.android.build.api.variant.AarMetadata) Added in 7.0.0


```
interface AarMetadata
```

<br />

*** ** * ** ***

Build-time properties for AAR Metadata inside a `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/Component`

This is accessed via `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/GeneratesAar#aarMetadata()`

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AarMetadata#minCompileSdk(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/MinCompileSdkSpec.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` |

| ### Public properties |
|---|---|
| `https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AarMetadata#minAgpVersion()` Minimum Android Gradle Plugin version needed to consume this library. |
| `https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AarMetadata#minCompileSdk()` **This property is deprecated.** Use minCompileSdk() instead. |
| `https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AarMetadata#minCompileSdkExtension()` **This property is deprecated.** Use minCompileSdk() instead. |
| `https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html<https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/CompileSdkVersion>` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AarMetadata#minCompileSdkVersion()` Do not set this property directly. |

## Public functions

### minCompileSdk

Added in 9.6.0-alpha03

```
fun minCompileSdk(action: MinCompileSdkSpec.() -> Unit): Unit
```

## Public properties

### minAgpVersion

Added in 7.1.0

```
val minAgpVersion: Property<String>
```

Minimum Android Gradle Plugin version needed to consume this library. This is the minimum AGP version a module must use in order to import this library.

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 7.0.0 Deprecated in 9.6.0-alpha03

```
val minCompileSdk: Property<Int>
```

> [!CAUTION]
> **This property is deprecated.**   
> Use minCompileSdk() instead. Once minCompileSdk() is set, this property has no effect.

Minimum compileSdkVersion needed to consume this library. This is the minimum sdk version a module must use in order to import this library.

### minCompileSdkExtension

Added in 7.4.0 Deprecated in 9.6.0-alpha03

```
val minCompileSdkExtension: Property<Int>
```

> [!CAUTION]
> **This property is deprecated.**   
> Use minCompileSdk() instead. Once minCompileSdk() is set, this property has no effect.

Minimum compileSdkExtension needed to consume this library. This is the minimum sdk extension version a module must use in order to import this library.

The default value of `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AarMetadata#minCompileSdkExtension()` is 0 if not set via the DSL.

### minCompileSdkVersion

Added in 9.6.0-alpha03

```
val minCompileSdkVersion: Property<CompileSdkVersion>
```

Do not set this property directly. Use `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/variant/AarMetadata#minCompileSdk(kotlin.Function1)` instead.