# PrivacySandboxSdkExtension

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


```
@Incubating
interface PrivacySandboxSdkExtension
```

<br />

*** ** * ** ***

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#bundle(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkBundle.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#lint(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/Lint.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for the lint tool. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#optimization(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkOptimization.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Specifies options for the R8/D8 optimization tool. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `@https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#signingConfig(kotlin.Function1)(action: https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/SigningConfig.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#buildToolsVersion()` Specifies the version of the [SDK Build Tools](https://developer.android.com/studio/releases/build-tools.html) to use when building your project. |
| `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkBundle` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#bundle()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#compileSdk()` Specifies the API level to compile your project against. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#compileSdkExtension()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#compileSdkPreview()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#experimentalProperties()` |
| `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/Lint` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#lint()` Specifies options for the lint tool. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#minSdk()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#minSdkPreview()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#namespace()` |
| `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkOptimization` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#optimization()` Specifies options for the R8/D8 optimization tool. |
| `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/SigningConfig` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#signingConfig()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkExtension#targetSdk()` |

## Public functions

### bundle

Added in 7.4.0

```
@Incubating
fun bundle(action: PrivacySandboxSdkBundle.() -> Unit): Unit
```

### lint

Added in 8.8.0

```
@Incubating
fun lint(action: Lint.() -> Unit): Unit
```

Specifies options for the lint tool.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/Lint`.

### optimization

Added in 8.4.0

```
@Incubating
fun optimization(action: PrivacySandboxSdkOptimization.() -> Unit): Unit
```

Specifies options for the R8/D8 optimization tool.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkOptimization`.

### signingConfig

Added in 8.1.0

```
@Incubating
fun signingConfig(action: SigningConfig.() -> Unit): Unit
```

## Public properties

### buildToolsVersion

Added in 7.4.0

```
var buildToolsVersion: String
```

Specifies the version of the [SDK Build Tools](https://developer.android.com/studio/releases/build-tools.html) to use when building your project.

By default, the plugin uses the minimum version of the build tools required by the [version of the plugin](https://developer.android.com/studio/releases/gradle-plugin.html#revisions) you're using. To specify a different version of the build tools for the plugin to use, specify the version as follows:

```
android {
    // Specifying this property is optional.
    buildToolsVersion "26.0.0"
}
```

For a list of build tools releases, read [the release notes](https://developer.android.com/studio/releases/build-tools.html#notes).

Note that the value assigned to this property is parsed and stored in a normalized form, so reading it back may give a slightly different result.

### bundle

Added in 7.4.0

```
val bundle: PrivacySandboxSdkBundle
```

### compileSdk

Added in 7.4.0

```
var compileSdk: Int?
```

Specifies the API level to compile your project against. The Android plugin requires you to configure this property.

This means your code can use only the Android APIs included in that API level and lower. You can configure the compile sdk version by adding the following to the `android` block: `compileSdk = 26`.

You should generally [use the most up-to-date API level](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) available. If you are planning to also support older API levels, it's good practice to [use the Lint tool](https://developer.android.com/studio/write/lint.html) to check if you are using APIs that are not available in earlier API levels.

The value you assign to this property is parsed and stored in a normalized form, so reading it back may return a slightly different value.

### compileSdkExtension

Added in 7.4.0

```
var compileSdkExtension: Int?
```

### compileSdkPreview

Added in 7.4.0

```
var compileSdkPreview: String?
```

### experimentalProperties

Added in 8.2.0

```
val experimentalProperties: MutableMap<String, Any>
```

### lint

Added in 8.8.0

```
val lint: Lint
```

Specifies options for the lint tool.

Android Studio and the Android SDK provide a code scanning tool called lint that can help you to identify and correct problems with the structural quality of your code without having to execute the app or write test cases. Each problem the tool detects is reported with a description message and a severity level, so that you can quickly prioritize the critical improvements that need to be made.

This property allows you to configure certain lint options, such as which checks to run or ignore. If you're using Android Studio, you can [configure similar lint options](https://developer.android.com/studio/write/lint.html#cis) from the IDE.

To learn more about using and running lint, read [Improve Your Code with Lint](https://developer.android.com/studio/write/lint.html).

| See also |
|---|---|
| `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/gradle/internal/dsl/LintOptions` |   |

### minSdk

Added in 7.4.0

```
var minSdk: Int?
```

### minSdkPreview

Added in 7.4.0

```
var minSdkPreview: String?
```

### namespace

Added in 7.4.0 Deprecated in 7.4.0

```
var namespace: String?
```

### optimization

Added in 8.4.0

```
val optimization: PrivacySandboxSdkOptimization
```

Specifies options for the R8/D8 optimization tool.

For more information about the properties you can configure in this block, see `https://developer.android.com/reference/tools/gradle-api/8.10/com/android/build/api/dsl/PrivacySandboxSdkOptimization`.

### signingConfig

Added in 8.1.0

```
val signingConfig: SigningConfig
```

### targetSdk

Added in 8.7.0

```
var targetSdk: Int?
```