# SettingsExtension

# SettingsExtension

<br />

```
interface SettingsExtension
```

<br />

*** ** * ** ***

Interface used for the`android`DSL in the`settings.gradle[.kts]`file, after the`com.android.settings`plugin is applied.

This allows settings default values that are then applied to all android projects which this build.

## Summary

|                                                                                                                                                                                                                                                                                                ### Public functions                                                                                                                                                                                                                                                                                                 ||
|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [compileSdkAddon](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#compileSdkAddon(kotlin.String,kotlin.String,kotlin.Int))`(vendor: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, name: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, version: `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)`                                                                    |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [execution](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#execution(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[Execution](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/Execution)`.() `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Set execution profiles and options for tools. |

|                                                                                                                                                                                              ### Public properties                                                                                                                                                                                               ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                           | [addOnName](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#addOnName()) Value set via`compileSdkAddon`                                                                                                                                  |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                           | [addOnVendor](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#addOnVendor()) Value set via`compileSdkAddon`                                                                                                                              |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`                                 | [addOnVersion](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#addOnVersion()) Value set via`compileSdkAddon`                                                                                                                            |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                              | [buildToolsVersion](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#buildToolsVersion()) Specifies the version of the[SDK Build Tools](https://developer.android.com/studio/releases/build-tools.html)to use when building your project. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`                                 | [compileSdk](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#compileSdk()) Specifies the API level to compile your project against.                                                                                                      |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`                                 | [compileSdkExtension](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#compileSdkExtension()) Specifies the SDK Extension level to compile your project against.                                                                          |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                           | [compileSdkPreview](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#compileSdkPreview()) Specify a preview API to compile your project against.                                                                                          |
| [Execution](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/Execution) | [execution](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#execution()) Set execution profiles and options for tools.                                                                                                                   |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?`                                 | [minSdk](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#minSdk()) The minimum SDK version.                                                                                                                                              |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                           | [minSdkPreview](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#minSdkPreview())                                                                                                                                                         |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`                           | [ndkPath](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#ndkPath()) Requires the specified path to NDK be used.                                                                                                                         |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                              | [ndkVersion](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#ndkVersion()) Requires the specified NDK version to be used.                                                                                                                |

## Public functions

### compileSdkAddon

```
fun compileSdkAddon(vendor: String, name: String, version: Int): Unit
```  

### execution

```
fun execution(action: @ExtensionFunctionType Execution.() -> Unit): Unit
```

Set execution profiles and options for tools.

## Public properties

### addOnName

```
val addOnName: String?
```

Value set via`compileSdkAddon`  

### addOnVendor

```
val addOnVendor: String?
```

Value set via`compileSdkAddon`  

### addOnVersion

```
val addOnVersion: Int?
```

Value set via`compileSdkAddon`  

### buildToolsVersion

```
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.

See[com.android.build.api.dsl.CommonExtension.buildToolsVersion](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/CommonExtension#buildToolsVersion(kotlin.String))for more information  

### 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](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

```
var compileSdkExtension: Int?
```

Specifies the SDK Extension level to compile your project against. This value is optional.

When not provided the base extension for the given`compileSdk`API level will be selected.  

### compileSdkPreview

```
var compileSdkPreview: String?
```

Specify a preview API to compile your project against.

For example, to try out the Android S preview, rather than`compileSdk = 30`you can use`compileSdkPreview = "S"`

Once the preview APIs are finalized, they will be allocated a stable integer value.  

### execution

```
val execution: Execution
```

Set execution profiles and options for tools.  

### minSdk

```
var minSdk: Int?
```

The minimum SDK version. Setting this it will override previous calls of[minSdk](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#minSdk())and[minSdkPreview](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#minSdkPreview())setters. Only one of[minSdk](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#minSdk())and[minSdkPreview](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/SettingsExtension#minSdkPreview())should be set.

See[uses-sdk element documentation](http://developer.android.com/guide/topics/manifest/uses-sdk-element.html).  

### minSdkPreview

```
var minSdkPreview: String?
```  

### ndkPath

```
var ndkPath: String?
```

Requires the specified path to NDK be used.

See[com.android.build.api.dsl.CommonExtension.ndkPath](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/CommonExtension#ndkPath())for more information  

### ndkVersion

```
var ndkVersion: String
```

Requires the specified NDK version to be used.

See[com.android.build.api.dsl.CommonExtension.ndkVersion](https://developer.android.com/reference/tools/gradle-api/8.2/com/android/build/api/dsl/CommonExtension#ndkVersion())for more information