[MPP] Use correct name for resolved K/N distribution libraries for IDE

KT-56671
This commit is contained in:
Pavel Kirpichenkov
2023-02-14 17:49:08 +02:00
committed by Space Team
parent b61a02db73
commit 317b9d28e0
3 changed files with 8 additions and 8 deletions
@@ -78,13 +78,13 @@ class MppIdeDependencyResolutionIT : KGPBaseTest() {
/* Find posix library */ /* Find posix library */
run { run {
nativeMainDependencies.assertMatches( nativeMainDependencies.assertMatches(
binaryCoordinates(Regex("org\\.jetbrains\\.kotlin\\.native:platform.posix:.*")), binaryCoordinates(Regex("org\\.jetbrains\\.kotlin\\.native:posix:.*")),
binaryCoordinates(Regex("org\\.jetbrains\\.kotlin\\.native:platform.*")) binaryCoordinates(Regex("org\\.jetbrains\\.kotlin\\.native:.*"))
) )
linuxMainDependencies.assertMatches( linuxMainDependencies.assertMatches(
binaryCoordinates(Regex("org\\.jetbrains\\.kotlin\\.native:platform.posix:.*")), binaryCoordinates(Regex("org\\.jetbrains\\.kotlin\\.native:posix:.*")),
binaryCoordinates(Regex("org\\.jetbrains\\.kotlin\\.native:platform.*")) binaryCoordinates(Regex("org\\.jetbrains\\.kotlin\\.native:.*"))
) )
} }
} }
@@ -40,8 +40,8 @@ internal fun Project.resolveNativeDistributionLibraryForIde(
classpath = IdeaKotlinClasspath(library), classpath = IdeaKotlinClasspath(library),
coordinates = IdeaKotlinBinaryCoordinates( coordinates = IdeaKotlinBinaryCoordinates(
group = "org.jetbrains.kotlin.native", group = "org.jetbrains.kotlin.native",
module = resolvedLibrary.packageFqName ?: resolvedLibrary.shortName ?: resolvedLibrary.uniqueName, module = resolvedLibrary.shortName ?: resolvedLibrary.uniqueName.split(".").last(),
version = project.konanVersion.toString(), version = project.konanVersion,
sourceSetName = target.identityString sourceSetName = target.identityString
), ),
).apply { ).apply {
@@ -33,7 +33,7 @@ class IdeNativePlatformDependencyResolverTest {
val linuxX64Test = kotlin.sourceSets.getByName("linuxX64Test") val linuxX64Test = kotlin.sourceSets.getByName("linuxX64Test")
val dependencies = listOf( val dependencies = listOf(
binaryCoordinates("org.jetbrains.kotlin.native:platform.posix:${project.konanVersion}:$LINUX_X64"), binaryCoordinates("org.jetbrains.kotlin.native:posix:${project.konanVersion}:$LINUX_X64"),
binaryCoordinates(Regex("""org\.jetbrains\.kotlin\.native:.*:${project.konanVersion}:$LINUX_X64""")) binaryCoordinates(Regex("""org\.jetbrains\.kotlin\.native:.*:${project.konanVersion}:$LINUX_X64"""))
) )
@@ -56,7 +56,7 @@ class IdeNativePlatformDependencyResolverTest {
val macosArm64Test = kotlin.sourceSets.getByName("macosArm64Test") val macosArm64Test = kotlin.sourceSets.getByName("macosArm64Test")
val dependencies = listOf( val dependencies = listOf(
binaryCoordinates("org.jetbrains.kotlin.native:platform.CoreFoundation:${project.konanVersion}:$MACOS_ARM64"), binaryCoordinates("org.jetbrains.kotlin.native:CoreFoundation:${project.konanVersion}:$MACOS_ARM64"),
binaryCoordinates(Regex("""org\.jetbrains\.kotlin\.native:.*:${project.konanVersion}:$MACOS_ARM64""")) binaryCoordinates(Regex("""org\.jetbrains\.kotlin\.native:.*:${project.konanVersion}:$MACOS_ARM64"""))
) )