From d81fb32fb9f264fef2b6149be9b0aac6e0ebc051 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 27 Apr 2023 16:29:08 +0600 Subject: [PATCH] remove previous deprecations --- CHANGELOG.md | 2 ++ .../coroutines/compose/FlowToMutableState.kt | 21 ---------------- .../launcher/src/commonMain/kotlin/Start.kt | 17 ------------- .../src/jsMain/kotlin/PluginsStarter.kt | 25 ------------------- 4 files changed, 2 insertions(+), 63 deletions(-) delete mode 100644 coroutines/compose/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/compose/FlowToMutableState.kt delete mode 100644 startup/launcher/src/commonMain/kotlin/Start.kt delete mode 100644 startup/launcher/src/jsMain/kotlin/PluginsStarter.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index e60ffdc7e4d..8a4f3d85761 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 0.18.0 +**ALL PREVIOUSLY DEPRECATED FUNCTIONALITY HAVE BEEN REMOVED** + * `Versions`: * `Android Fragments`: `1.5.6` -> `1.5.7` * `Ktor`: diff --git a/coroutines/compose/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/compose/FlowToMutableState.kt b/coroutines/compose/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/compose/FlowToMutableState.kt deleted file mode 100644 index 92fba8f2176..00000000000 --- a/coroutines/compose/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/compose/FlowToMutableState.kt +++ /dev/null @@ -1,21 +0,0 @@ -package dev.inmo.micro_utils.coroutines.compose - -import androidx.compose.runtime.MutableState -import androidx.compose.runtime.mutableStateOf -import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.StateFlow - -@Deprecated("Duplicated functionality", ReplaceWith("asMutableComposeState(initial, scope)", "dev.inmo.micro_utils.coroutines.compose.asMutableComposeState")) -fun Flow.toMutableState( - initial: T, - scope: CoroutineScope -): MutableState = asMutableComposeState(initial, scope) - -@Deprecated("Duplicated functionality", ReplaceWith("asMutableComposeState(scope)", "dev.inmo.micro_utils.coroutines.compose.asMutableComposeState")) -@Suppress("NOTHING_TO_INLINE") -inline fun StateFlow.toMutableState( - scope: CoroutineScope -): MutableState = asMutableComposeState(scope) - diff --git a/startup/launcher/src/commonMain/kotlin/Start.kt b/startup/launcher/src/commonMain/kotlin/Start.kt deleted file mode 100644 index 3c3c715f50d..00000000000 --- a/startup/launcher/src/commonMain/kotlin/Start.kt +++ /dev/null @@ -1,17 +0,0 @@ -package dev.inmo.micro_utils.startup.launcher - -import dev.inmo.micro_utils.startup.launcher.StartLauncherPlugin.setupDI -import kotlinx.serialization.json.JsonObject -import org.koin.core.KoinApplication - -/** - * Will create [KoinApplication], init, load modules using [StartLauncherPlugin] and start plugins using the same base - * plugin - * - * @param rawConfig It is expected that this [JsonObject] will contain serialized [Config] ([StartLauncherPlugin] will - * deserialize it in its [StartLauncherPlugin.setupDI] - */ -@Deprecated("Fully replaced with StartLauncherPlugin#start", ReplaceWith("StartLauncherPlugin.start(rawConfig)", "dev.inmo.micro_utils.startup.launcher.StartLauncherPlugin")) -suspend fun start(rawConfig: JsonObject) { - StartLauncherPlugin.start(rawConfig) -} diff --git a/startup/launcher/src/jsMain/kotlin/PluginsStarter.kt b/startup/launcher/src/jsMain/kotlin/PluginsStarter.kt deleted file mode 100644 index c0a9944becf..00000000000 --- a/startup/launcher/src/jsMain/kotlin/PluginsStarter.kt +++ /dev/null @@ -1,25 +0,0 @@ -package dev.inmo.micro_utils.startup.launcher - -import dev.inmo.kslog.common.KSLog -import dev.inmo.kslog.common.i -import kotlinx.serialization.json.JsonObject -import kotlinx.serialization.json.jsonObject - -@Deprecated("Useless due to including of the same functionality in StrtLauncherPlugin") -object PluginsStarter { - init { - KSLog.default = KSLog("Launcher") - } - - /** - * It is expected that you have registered all the [dev.inmo.micro_utils.startup.plugin.StartPlugin]s of your JS - * app inside of [dev.inmo.micro_utils.startup.plugin.StartPluginSerializer] using its - * [dev.inmo.micro_utils.startup.plugin.StartPluginSerializer.registerPlugin] method - */ - suspend fun startPlugins(json: JsonObject) = StartLauncherPlugin.start(json) - /** - * Will convert [config] to [JsonObject] with auto registration of [dev.inmo.micro_utils.startup.plugin.StartPlugin]s - * in [dev.inmo.micro_utils.startup.plugin.StartPluginSerializer] - */ - suspend fun startPlugins(config: Config) = StartLauncherPlugin.start(config) -}