# BundleConfig

# BundleConfig

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

<br />

```
@Incubating
interface BundleConfig
```

<br />

*** ** * ** ***

Information related to the actions creating a bundle (.aab) file for the variant.

## Summary

|                             ### Public functions                             |
|------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [addMetadataFile](https://developer.android.com/reference/tools/gradle-api/8.7/com/android/build/api/variant/BundleConfig#addMetadataFile(kotlin.String,org.gradle.api.provider.Provider))`(metadataDirectory: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, file: `[Provider](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html)`<`[RegularFile](https://docs.gradle.org/current/javadoc/org/gradle/api/file/RegularFile.html)`>)` Add a metadata file to the bundle (.aab) file. |

|                                                      ### Public properties                                                      |
|---------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [CodeTransparency](https://developer.android.com/reference/tools/gradle-api/8.7/com/android/build/api/variant/CodeTransparency) | [codeTransparency](https://developer.android.com/reference/tools/gradle-api/8.7/com/android/build/api/variant/BundleConfig#codeTransparency()) Settings associated with the code transparency feature in bundles. |

## Public functions

### addMetadataFile

Added in 7.2.0  

```
fun addMetadataFile(metadataDirectory: String, file: Provider<RegularFile>): Unit
```

Add a metadata file to the bundle (.aab) file. The file will be added under the BUNDLE-METADATA folder.  

|                                                                                             Parameters                                                                                             |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadataDirectory: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                                                              | the directory below BUNDLE-METADATA where the file should be stored.                                                                                                                                                                                                                                                                                         |
| `file: `[Provider](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html)`<`[RegularFile](https://docs.gradle.org/current/javadoc/org/gradle/api/file/RegularFile.html)`>` | the[Provider](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html)of[RegularFile](https://docs.gradle.org/current/javadoc/org/gradle/api/file/RegularFile.html)that can be wired from a[org.gradle.api.Task](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html)output or an existing file in the project directory. |

## Public properties

### codeTransparency

Added in 7.1.0  

```
val codeTransparency: CodeTransparency
```

Settings associated with the code transparency feature in bundles. Initialized from the corresponding DSL elements.