targetKotlinPlatforms
A set of Kotlin platforms to which the Compose compiler plugin will be applied.
By default, all Kotlin platforms are enabled.
To enable only one specific Kotlin platform:
composeCompiler {
targetKotlinPlatforms.set(setOf(KotlinPlatformType.jvm))
}
Content copied to clipboard
To disable the Compose plugin for one or more Kotlin platforms:
composeCompiler {
targetKotlinPlatforms.set(
KotlinPlatformType.values()
.filterNot {
it == KotlinPlatformType.native ||
it == KotlinPlatformType.js
}.asIterable()
)
}
Content copied to clipboard