From 3a5f52c8c66fc30cf107406efca5d11685e8ecb4 Mon Sep 17 00:00:00 2001 From: Konstantin Tskhovrebov Date: Thu, 11 Apr 2024 12:37:41 +0200 Subject: [PATCH] [gradle] Add deprecation warnings to Compose compiler options --- .../jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt | 4 ++-- .../src/main/kotlin/org/jetbrains/compose/ComposeExtension.kt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt index f7c7406307..04d9ed101c 100644 --- a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt +++ b/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." diff --git a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeExtension.kt b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeExtension.kt index ee3c0a52cf..23287fcf30 100644 --- a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeExtension.kt +++ b/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 = 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 = 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 = objects.setProperty(KotlinPlatformType::class.java).apply { set(KotlinPlatformType.values().toMutableSet()) }