HMPP. Avoid leaking platform-specific dependencies into common libraries

Issue #KMM-217
This commit is contained in:
Dmitriy Dolovov
2020-04-09 18:40:57 +07:00
parent b67a48f220
commit 7be9a2ef17
@@ -96,7 +96,7 @@ class LibraryDependenciesCacheImpl(private val project: Project) : LibraryDepend
* @return true if it's OK to add a dependency from a library with platform [from] to a library with platform [to]
*/
private fun compatiblePlatforms(from: TargetPlatform, to: TargetPlatform): Boolean {
return from == to || to.isCommon()
return from === to || to.containsAll(from) || to.isCommon()
}
private fun getLibraryUsageIndex(): LibraryUsageIndex {