Browse Source

[gradle] Add deprecation warnings to Compose compiler options

pull/4604/head
Konstantin Tskhovrebov 1 month ago
parent
commit
3a5f52c8c6
  1. 4
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt
  2. 3
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeExtension.kt

4
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt

@ -34,8 +34,8 @@ internal fun Project.configureComposeCompilerPlugin() {
}
}
private const val newCompilerIsAvailableVersion = "2.0.0-RC1"
private const val newComposeCompilerKotlinSupportPluginId = "org.jetbrains.kotlin.plugin.compose"
internal const val newCompilerIsAvailableVersion = "2.0.0-RC1"
internal const val newComposeCompilerKotlinSupportPluginId = "org.jetbrains.kotlin.plugin.compose"
internal const val newComposeCompilerError = "Since Kotlin $newCompilerIsAvailableVersion " +
"to use Compose Multiplatform you must apply \"$newComposeCompilerKotlinSupportPluginId\" plugin."

3
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeExtension.kt

@ -31,6 +31,7 @@ abstract class ComposeExtension @Inject constructor(
* ```
* (see available versions here: https://developer.android.com/jetpack/androidx/releases/compose-kotlin#pre-release_kotlin_compatibility)
*/
@Deprecated("Since Kotlin $newCompilerIsAvailableVersion Compose Compiler configuration is moved to the \"$newComposeCompilerKotlinSupportPluginId\" plugin")
val kotlinCompilerPlugin: Property<String?> = objects.nullableProperty()
/**
@ -41,6 +42,7 @@ abstract class ComposeExtension @Inject constructor(
* See all available arguments here:
* https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposePlugin.kt
*/
@Deprecated("Since Kotlin $newCompilerIsAvailableVersion Compose Compiler configuration is moved to the \"$newComposeCompilerKotlinSupportPluginId\" plugin")
val kotlinCompilerPluginArgs: ListProperty<String> = objects.listProperty(String::class.java)
/**
@ -51,6 +53,7 @@ abstract class ComposeExtension @Inject constructor(
* platformTypes.set(platformTypes.get() - KotlinPlatformType.native)
* ```
*/
@Deprecated("Since Kotlin $newCompilerIsAvailableVersion Compose Compiler configuration is moved to the \"$newComposeCompilerKotlinSupportPluginId\" plugin")
val platformTypes: SetProperty<KotlinPlatformType> = objects.setProperty(KotlinPlatformType::class.java).apply {
set(KotlinPlatformType.values().toMutableSet())
}

Loading…
Cancel
Save