Skip to content

Commit

Permalink
[gradle] Add deprecation warnings to Compose compiler options
Browse files Browse the repository at this point in the history
  • Loading branch information
terrakok committed Apr 11, 2024
1 parent 9bc3bca commit 0663b4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

/**
Expand All @@ -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)

/**
Expand All @@ -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())
}
Expand Down

0 comments on commit 0663b4d

Please sign in to comment.