Repository: JetBrains/compose-multiplatform
File: gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/RuntimeLibrariesCompatibilityCheck.kt (Kotlin)

Code before:
        }
    }

    @TaskAction
    fun run() {
        val expectedRuntimeVersion = expectedVersion.get()
        val composeLibs = allDependencies.get()
            .mapNotNull { it.selected.moduleVersion }
            .filter { lib -> lib.group + ":" + lib.name in composeLibrariesForCheck }
            .distinctBy { lib -> "${lib.group}:${lib.name}:${lib.version}" }
        val composeProblems = composeLibs.mapNotNull { lib ->
            if (lib.version == expectedRuntimeVersion) return@mapNotNull null
            ProblemLibrary(lib.group + ":" + lib.name, lib.version)
        }
        if (composeProblems.isNotEmpty()) {
            logger.warn(
                getComposeMessage(
                    projectPath.get(),
                    configurationName.get(),
                    composeProblems,
                    expectedRuntimeVersion
                )
            )
        }

        val dependencyUsages = allDependencies.get().mapNotNull { dep ->
            val requested = dep.requested as? ModuleComponentSelector
            val selected = dep.selected.moduleVersion

            val requestedGroup = requested?.group
            val selectedGroup = selected?.group
            if (requestedGroup != skikoGroup && selectedGroup != skikoGroup) {
                return@mapNotNull null
            }

            DependencyUsage(
                requestedName = requested?.let { "${it.group}:${it.module}" },
                requestedVersion = requested?.version,
                selectedName = selected?.let { "${it.group}:${it.name}" },
                selectedVersion = selected?.version,
            )
        }.distinct()

        if (hasIncompatibleVersions(dependencyUsages)) {
            logger.warn(
                getSkikoMessage(
                    projectPath.get(),
                    configurationName.get(),
                    dependencyUsages
                )
            )

Review comment (suggestion):
```suggestion
        val skikoDependencyUsages = allDependencies.get().mapNotNull { dep ->
```

Code after:
        }
    }

    @TaskAction
    fun run() {
        val expectedRuntimeVersion = expectedVersion.get()
        val composeLibraries = allDependencies.get()
            .mapNotNull { it.selected.moduleVersion }
            .filter { lib -> "${lib.group}:${lib.name}" in composeLibrariesForCheck }
            .distinctBy { lib -> "${lib.group}:${lib.name}:${lib.version}" }
        val composeInconsistentVersions = composeLibraries.filter { lib ->
            lib.version != expectedRuntimeVersion
        }
        if (composeInconsistentVersions.isNotEmpty()) {
            logger.warn(
                getComposeMessage(
                    projectPath.get(),
                    configurationName.get(),
                    composeInconsistentVersions,
                    expectedRuntimeVersion
                )
            )
        }

        val skikoIncompatibleDependencyUsages = allDependencies.get().filter { dependency ->
            val requested = dependency.requested as? ModuleComponentSelector ?: return@filter false
            val selected = dependency.selected.moduleVersion ?: return@filter false
            if ("${requested.group}:${requested.module}" != skikoLibraryForCheck) return@filter false
            if ("${selected.group}:${selected.name}" != skikoLibraryForCheck) return@filter false
            majorMinorVersion(requested.version) != majorMinorVersion(selected.version)
        }
        if (skikoIncompatibleDependencyUsages.isNotEmpty()) {
            logger.warn(
                getSkikoMessage(
                    projectPath.get(),
                    configurationName.get(),
                    skikoIncompatibleDependencyUsages
                )
            )
        }
    }

    private fun getComposeMessage(
        projectName: String,
        configurationName: String,
        composeInconsistentVersions: List<ModuleVersionIdentifier>,
        expectedVersion: String,
    ): String = buildString {
        appendLine("w: Compose Multiplatform runtime dependencies' versions don't match with plugin version.")
        composeInconsistentVersions.forEach { library ->
            appendLine("    expected: '${library.group}:${library.name}:$expectedVersion'")