From 87c339f6379c9172aea2aedac71cbde79030619d Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Wed, 16 Mar 2022 16:52:05 +0100 Subject: [PATCH] [Minor] KotlinMetadataCompilationData: Use `LinkedHashMap` directly Previously commonCompilationDataPerFragment and nativeCompilationDataPerFragment were declared as using `mutableMapOf`, which will not offer the necessary 'compute' function in IDE analysis. KT-51386 --- .../gradle/plugin/mpp/pm20/KotlinMetadataCompilationData.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/pm20/KotlinMetadataCompilationData.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/pm20/KotlinMetadataCompilationData.kt index 70d1ca23612..cdfac3edc88 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/pm20/KotlinMetadataCompilationData.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/pm20/KotlinMetadataCompilationData.kt @@ -182,8 +182,8 @@ internal open class KotlinNativeFragmentMetadataCompilationDataImpl( // TODO think about more generic case: a fragment that can be compiled by an arbitrary compiler // what tasks should we create? should there be a generic task for that? internal class MetadataCompilationRegistry { - private val commonCompilationDataPerFragment = mutableMapOf() - private val nativeCompilationDataPerFragment = mutableMapOf() + private val commonCompilationDataPerFragment = LinkedHashMap() + private val nativeCompilationDataPerFragment = LinkedHashMap() fun registerCommon(fragment: KotlinGradleFragment, compilationData: KotlinCommonFragmentMetadataCompilationDataImpl) { commonCompilationDataPerFragment.compute(fragment) { _, existing ->