From 2043c9db8e94abe59d76698a23530c5a3bfc0c15 Mon Sep 17 00:00:00 2001 From: Sebastian Sellmair Date: Tue, 28 Mar 2023 14:13:42 +0200 Subject: [PATCH] [Gradle] Rename Kotlin~Multiplatfom~PluginLifecycleCoroutineContextElement ^KT-56654 Verification Pending --- .../kotlin/gradle/plugin/KotlinPluginLifecycle.kt | 12 ++++++------ .../targetHierarchy/defaultKotlinTargetHierarchy.kt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPluginLifecycle.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPluginLifecycle.kt index 20455e61b7d..81bb92f6ee5 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPluginLifecycle.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/KotlinPluginLifecycle.kt @@ -127,8 +127,8 @@ internal fun Project.startKotlinPluginLifecycle() { * the currently running coroutine. Throws if this coroutine was not started using a [KotlinPluginLifecycle] */ internal suspend fun currentKotlinPluginLifecycle(): KotlinPluginLifecycle { - return currentCoroutineContext()[KotlinMultiplatformPluginLifecycleCoroutineContextElement]?.lifecycle - ?: error("Missing $KotlinMultiplatformPluginLifecycleCoroutineContextElement in currentCoroutineContext") + return currentCoroutineContext()[KotlinPluginLifecycleCoroutineContextElement]?.lifecycle + ?: error("Missing $KotlinPluginLifecycleCoroutineContextElement in currentCoroutineContext") } /** @@ -429,7 +429,7 @@ private class KotlinPluginLifecycleImpl(override val project: Project) : KotlinP val coroutine = block.createCoroutine(this, object : Continuation { override val context: CoroutineContext = EmptyCoroutineContext + - KotlinMultiplatformPluginLifecycleCoroutineContextElement(lifecycle) + KotlinPluginLifecycleCoroutineContextElement(lifecycle) override fun resumeWith(result: Result) = result.getOrThrow() }) @@ -474,12 +474,12 @@ private class KotlinPluginLifecycleImpl(override val project: Project) : KotlinP } } -private class KotlinMultiplatformPluginLifecycleCoroutineContextElement( +private class KotlinPluginLifecycleCoroutineContextElement( val lifecycle: KotlinPluginLifecycle ) : CoroutineContext.Element { - companion object Key : CoroutineContext.Key + companion object Key : CoroutineContext.Key - override val key: CoroutineContext.Key = Key + override val key: CoroutineContext.Key = Key } private class RestrictedLifecycleStages( diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/targetHierarchy/defaultKotlinTargetHierarchy.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/targetHierarchy/defaultKotlinTargetHierarchy.kt index e0a3a1d7684..d15c3e4efe2 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/targetHierarchy/defaultKotlinTargetHierarchy.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/targetHierarchy/defaultKotlinTargetHierarchy.kt @@ -13,7 +13,7 @@ internal val defaultKotlinTargetHierarchy = KotlinTargetHierarchyDescriptor { withModule(ModuleName.main, ModuleName.test) common { - /* All compilations shall receive be added to the common group by default */ + /* All compilations shall be added to the common group by default */ withCompilations { true } group("native") {