Browse Source

Remove WarnAboutComposeWithSerialization.kt (#1167)

Since kotlin 1.5.30, kotlinx.serialization plugin is forced to run its transformations before any other plugin. This made compose and kotlinx.serialization compatible, therefore no need to warn about their simultaneous usage.

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
pull/1187/head
Oleksandr Karpovich 3 years ago committed by GitHub
parent
commit
5dc4f1d9d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
  2. 18
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/internal/WarnAboutComposeWithSerialization.kt

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

@ -16,7 +16,6 @@ import org.jetbrains.compose.desktop.DesktopExtension
import org.jetbrains.compose.desktop.application.internal.configureApplicationImpl
import org.jetbrains.compose.desktop.application.internal.currentTarget
import org.jetbrains.compose.desktop.preview.internal.initializePreview
import org.jetbrains.compose.internal.checkAndWarnAboutComposeWithSerialization
import org.jetbrains.compose.web.internal.initializeWeb
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@ -107,8 +106,6 @@ class ComposePlugin : Plugin<Project> {
useIR = true
}
}
project.checkAndWarnAboutComposeWithSerialization()
}
object Dependencies {

18
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/internal/WarnAboutComposeWithSerialization.kt

@ -1,18 +0,0 @@
package org.jetbrains.compose.internal
import org.gradle.api.Project
internal fun Project.checkAndWarnAboutComposeWithSerialization() {
project.plugins.withId("org.jetbrains.kotlin.plugin.serialization") {
val warningMessage = """
>>> COMPOSE WARNING
>>> Project `${project.name}` has `compose` and `kotlinx.serialization` plugins applied!
>>> Consider using these plugins in separate modules to avoid compilation errors
>>> Check more details here: https://github.com/JetBrains/compose-jb/issues/738
""".trimIndent()
logger.warn(warningMessage)
}
}
Loading…
Cancel
Save