TargetSdkSpec

Added in 8.12.0-alpha06

interface TargetSdkSpec


DSL object to configure the target SDK.

To configure target SDK with a release API level,

android {
defaultConfig {
targetSdk {
version = release(33)
}
}
}

or with a preview API level

android {
defaultConfig {
targetSdk {
version = preview("Tiramisu")
}
}
}

Summary

Public functions

TargetSdkVersion
preview(codeName: String)

To set target SDK version with a preview API level, use this function to compute the TargetSdkVersion and assign it to TargetSdkSpec.version property.

TargetSdkVersion
release(version: Int)

To set target SDK version with a released API level, use this function to compute the TargetSdkVersion and assign it to TargetSdkSpec.version property.

Public properties

TargetSdkVersion?

The target SDK version.

Public functions

preview

Added in 8.12.0-alpha06
fun preview(codeName: String): TargetSdkVersion

To set target SDK version with a preview API level, use this function to compute the TargetSdkVersion and assign it to TargetSdkSpec.version property.

release

Added in 8.12.0-alpha06
fun release(version: Int): TargetSdkVersion

To set target SDK version with a released API level, use this function to compute the TargetSdkVersion and assign it to TargetSdkSpec.version property.

Public properties

version

Added in 8.12.0-alpha06
var versionTargetSdkVersion?

The target SDK version.