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

Code before:
            appendLine("    expected: '${lib.name}:$expectedVersion'")
            appendLine("    actual:   '${lib.name}:${lib.version}'")
            appendLine()
        }
        appendNoteAboutDependencyMismatch(projectName, configurationName)
        appendLine()
        appendLine("Please update Compose Multiplatform Gradle plugin's version or align dependencies' versions to match the current plugin version.")
    }

    private fun getSkikoMessage(
        projectName: String,
        configurationName: String,
        dependencyUsages: List<DependencyUsage>,
    ): String = buildString {
        appendLine("w: Skiko dependencies use incompatible versions in the dependency tree.")
        dependencyUsages.forEach { usage ->
                val requested = usage.requestedName?.let { "$it:${usage.requestedVersion}" } ?: "<unknown>"
                val selected = usage.selectedName?.let { "$it:${usage.selectedVersion}" } ?: "<unknown>"
                appendLine("    requested: '$requested'")
                appendLine("    selected:  '$selected'")
                appendLine()
            }
        appendNoteAboutDependencyMismatch(projectName, configurationName)
        appendLine()
        appendLine("Note: Skiko is considered implementation detail in Compose Multiplatform and might be incompatible across versions.")
        appendLine("Please align Skiko dependencies to the same version. If possible, avoid direct skiko references and use Compose APIs instead.")
    }

    private fun StringBuilder.appendNoteAboutDependencyMismatch(
        projectName: String,
        configurationName: String,
    ) {
        appendLine("This may lead to compilation errors or unexpected behavior at runtime.")
        appendLine("Such version mismatch might be caused by dependency constraints in one of the included libraries.")
        val taskName = if (projectName.isNotEmpty() && !projectName.endsWith(":")) "$projectName:dependencies" else "${projectName}dependencies"
        appendLine("You can inspect resulted dependencies tree via `./gradlew $taskName  --configuration ${configurationName}`.")
        appendLine("See more details in Gradle documentation: https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html#sec:listing-dependencies")
    }
}


Review comment (bug):
```suggestion
        appendLine("Please align Skiko dependencies to the same version. If possible, avoid direct skiko references and use Compose APIs instead.")
        appendLine("If the different version is used by a third-party library, ask the library author to update it using the latest Compose.")
```

Can we also write dependencies that use a wrong Skiko? Or at least a command that can show that?

Otherwise in most cases, in is not informative for app developers.

Code after:
            appendLine("    \\--- ${requested.toModuleString()} -> ${selected?.version}")
            appendLine()
        }
        appendNoteAboutDependencyMismatch(projectName, configurationName)
        appendLine()
        appendLine("Note: Skiko is considered implementation detail in Compose Multiplatform and might be incompatible across versions.")
        appendLine("Please align Skiko dependencies to the same version. If possible, avoid direct Skiko references and use Compose APIs instead.")
    }

    private fun StringBuilder.appendNoteAboutDependencyMismatch(
        projectName: String,
        configurationName: String,
    ) {
        appendLine("This may lead to compilation errors or unexpected behavior at runtime.")
        appendLine("Such version mismatch might be caused by dependency constraints in one of the included libraries.")
        val taskName = if (projectName.isNotEmpty() && !projectName.endsWith(":")) "$projectName:dependencies" else "${projectName}dependencies"
        appendLine("You can inspect resulted dependencies tree via `./gradlew $taskName  --configuration ${configurationName}`.")
        appendLine("See more details in Gradle documentation: https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html#sec:listing-dependencies")
    }

    private fun ModuleVersionIdentifier?.toModuleString() = when (this) {
        null -> "<unknown>"
        else -> "$group:$name:$version"
    }
    private fun ComponentSelector?.toModuleString(): String = when (this) {
        is ProjectComponentSelector -> "project $projectPath"
        is ModuleComponentSelector -> "$group:$module:$version"
        null -> "<unknown>"
        else -> displayName
    }
}