Stay organized with collections
Save and categorize content based on your preferences.
PrivacySandboxSdkExtension
@Incubating interface PrivacySandboxSdkExtension
Summary
Public functions
Public properties
var buildToolsVersion: String
Specifies the version of the SDK Build Tools 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 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.
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.
compileSdk
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 available. If you are planning to also support older API levels, it's good practice to use the Lint tool 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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# PrivacySandboxSdkExtension\n==========================\n\n\n```\n@Incubating interface PrivacySandboxSdkExtension\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nSummary\n-------\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [bundle](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkExtension#bundle(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[PrivacySandboxSdkBundle](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkBundle)`.() `-\u003e` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` |\n\n| ### Public properties ||\n|--------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [buildToolsVersion](/reference/tools/gradle-api/8.0/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. |\n| [PrivacySandboxSdkBundle](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkBundle) | [bundle](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkExtension#bundle()) |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` | [compileSdk](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkExtension#compileSdk()) Specifies the API level to compile your project against. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` | [compileSdkExtension](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkExtension#compileSdkExtension()) |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [compileSdkPreview](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkExtension#compileSdkPreview()) |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?` | [minSdk](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkExtension#minSdk()) |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [minSdkPreview](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkExtension#minSdkPreview()) |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | [namespace](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/PrivacySandboxSdkExtension#namespace()) |\n\nPublic functions\n----------------\n\n### bundle\n\n```\n@Incubating\nfun bundle(action: @ExtensionFunctionType PrivacySandboxSdkBundle.() -\u003e Unit): Unit\n```\n\nPublic properties\n-----------------\n\n### buildToolsVersion\n\n```\nvar buildToolsVersion: String\n```\n\nSpecifies the version of the [SDK Build Tools](https://developer.android.com/studio/releases/build-tools.html) to use when building your project.\n\nBy 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: \n\n```text\nandroid {\n // Specifying this property is optional.\n buildToolsVersion \"26.0.0\"\n}\n```\n\nFor a list of build tools releases, read [the release notes](https://developer.android.com/studio/releases/build-tools.html#notes).\n\nNote 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. \n\n### bundle\n\n```\nval bundle: PrivacySandboxSdkBundle\n``` \n\n### compileSdk\n\n```\nvar compileSdk: Int?\n```\n\nSpecifies the API level to compile your project against. The Android plugin requires you to configure this property.\n\nThis 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`.\n\nYou 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.\n\nThe value you assign to this property is parsed and stored in a normalized form, so reading it back may return a slightly different value. \n\n### compileSdkExtension\n\n```\nvar compileSdkExtension: Int?\n``` \n\n### compileSdkPreview\n\n```\nvar compileSdkPreview: String?\n``` \n\n### minSdk\n\n```\nvar minSdk: Int?\n``` \n\n### minSdkPreview\n\n```\nvar minSdkPreview: String?\n``` \n\n### namespace\n\n```\nvar namespace: String?\n```"]]