SettingsExtension
@Incubating interface SettingsExtension
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 |
compileSdkAddon(vendor: String, name: String, version: Int) |
Unit |
Set execution profiles and options for tools. |
Unit |
execution(action: @ExtensionFunctionType Execution.() -> Unit) Set execution profiles and options for tools. |
Public properties |
|
---|---|
String? |
Value set via |
String? |
Value set via |
Int? |
Value set via |
String? |
Specifies the version of the SDK Build Tools to use when building your project. |
Int? |
Specifies the API level to compile your project against. |
Int? |
Specifies the SDK Extension level to compile your project against. |
String? |
Specify a preview API to compile your project against. |
Execution |
Set execution profiles and options for tools. |
Int? |
The minimum SDK version. |
String? |
|
String? |
Requires the specified path to NDK be used. |
String? |
Requires the specified NDK version to be used. |
Public functions
execution
fun execution(action: Action<Execution>): Unit
Set execution profiles and options for tools.
execution
fun execution(action: @ExtensionFunctionType Execution.() -> Unit): Unit
Set execution profiles and options for tools.
Public properties
buildToolsVersion
var buildToolsVersion: String?
Specifies the version of the SDK Build Tools to use when building your project.
See com.android.build.api.dsl.CommonExtension.buildToolsVersion
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 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.
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.
minSdk
var minSdk: Int?
The minimum SDK version. Setting this it will override previous calls of minSdk
and minSdkPreview
setters. Only one of minSdk
and minSdkPreview
should be set.
ndkPath
var ndkPath: String?
Requires the specified path to NDK be used.
See 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
for more information