update dependencies

This commit is contained in:
InsanusMokrassar 2022-01-02 12:41:15 +06:00
parent 79ddfaf9bd
commit 4113fb2cc1
3 changed files with 15 additions and 15 deletions

View File

@ -63,7 +63,7 @@ internal class InternalPluginSerializer(
) : KSerializer<Plugin> { ) : KSerializer<Plugin> {
override val descriptor: SerialDescriptor = PluginSerializer.descriptor override val descriptor: SerialDescriptor = PluginSerializer.descriptor
@InternalSerializationApi @OptIn(InternalSerializationApi::class)
override fun deserialize(decoder: Decoder): Plugin { override fun deserialize(decoder: Decoder): Plugin {
val asJson = JsonElement.serializer().deserialize(decoder) val asJson = JsonElement.serializer().deserialize(decoder)
@ -75,7 +75,7 @@ internal class InternalPluginSerializer(
} }
} }
@InternalSerializationApi @OptIn(InternalSerializationApi::class)
override fun serialize(encoder: Encoder, value: Plugin) { override fun serialize(encoder: Encoder, value: Plugin) {
params.keys.firstOrNull { params[it] === value } ?.also { params.keys.firstOrNull { params[it] === value } ?.also {
encoder.encodeString(it) encoder.encodeString(it)
@ -90,7 +90,7 @@ internal class InternalModuleSerializer(
) : KSerializer<Module> { ) : KSerializer<Module> {
override val descriptor: SerialDescriptor = PluginSerializer.descriptor override val descriptor: SerialDescriptor = PluginSerializer.descriptor
@InternalSerializationApi @OptIn(InternalSerializationApi::class)
override fun deserialize(decoder: Decoder): Module { override fun deserialize(decoder: Decoder): Module {
val asJson = JsonElement.serializer().deserialize(decoder) val asJson = JsonElement.serializer().deserialize(decoder)
@ -101,7 +101,7 @@ internal class InternalModuleSerializer(
} }
} }
@InternalSerializationApi @OptIn(InternalSerializationApi::class)
override fun serialize(encoder: Encoder, value: Module) = DefaultModuleSerializer.serialize(encoder, value) override fun serialize(encoder: Encoder, value: Module) = DefaultModuleSerializer.serialize(encoder, value)
} }
@ -119,7 +119,7 @@ internal object PluginsConfigurationSerializer : KSerializer<PluginsConfiguratio
private val moduleSerializer = ModuleSerializer() private val moduleSerializer = ModuleSerializer()
override val descriptor: SerialDescriptor = jsonSerializer.descriptor override val descriptor: SerialDescriptor = jsonSerializer.descriptor
@InternalSerializationApi @OptIn(InternalSerializationApi::class)
override fun deserialize(decoder: Decoder): PluginsConfiguration { override fun deserialize(decoder: Decoder): PluginsConfiguration {
val json = jsonSerializer.deserialize(decoder) val json = jsonSerializer.deserialize(decoder)
val jsonFormat = (decoder as? JsonDecoder) ?.json ?: configAndPluginsConfigJsonFormat val jsonFormat = (decoder as? JsonDecoder) ?.json ?: configAndPluginsConfigJsonFormat
@ -154,7 +154,7 @@ internal object PluginsConfigurationSerializer : KSerializer<PluginsConfiguratio
} }
} }
@InternalSerializationApi @OptIn(InternalSerializationApi::class)
override fun serialize(encoder: Encoder, value: PluginsConfiguration) { override fun serialize(encoder: Encoder, value: PluginsConfiguration) {
val params = value.params val params = value.params
val serializer = when (value) { val serializer = when (value) {

View File

@ -4,14 +4,14 @@ org.gradle.parallel=true
kotlin.js.generate.externals=true kotlin.js.generate.externals=true
kotlin.incremental=true kotlin.incremental=true
kotlin_version=1.5.31 kotlin_version=1.6.10
kotlin_coroutines_version=1.5.2 kotlin_coroutines_version=1.6.0
kotlin_serialisation_runtime_version=1.3.1 kotlin_serialisation_runtime_version=1.3.2
kotlin_exposed_version=0.36.1 kotlin_exposed_version=0.37.2
sdi_version=0.6.0 sdi_version=0.6.0
tgbotapi_version=0.37.0 tgbotapi_version=0.38.0
microutils_version=0.8.2 microutils_version=0.9.0
klassindex_version=4.1.0-rc.1 klassindex_version=4.1.0-rc.1
sqlite_version=3.36.0.3 sqlite_version=3.36.0.3

View File

@ -15,7 +15,7 @@ object PluginSerializer : KSerializer<Plugin> {
private val polymorphic = PolymorphicSerializer(Plugin::class) private val polymorphic = PolymorphicSerializer(Plugin::class)
override val descriptor: SerialDescriptor = JsonObject.serializer().descriptor override val descriptor: SerialDescriptor = JsonObject.serializer().descriptor
@InternalSerializationApi @OptIn(InternalSerializationApi::class)
override fun deserialize(decoder: Decoder): Plugin { override fun deserialize(decoder: Decoder): Plugin {
val format = (decoder as? JsonDecoder) ?.json ?: defaultJson val format = (decoder as? JsonDecoder) ?.json ?: defaultJson
val asJson = JsonElement.serializer().deserialize(decoder) val asJson = JsonElement.serializer().deserialize(decoder)
@ -45,9 +45,9 @@ object PluginSerializer : KSerializer<Plugin> {
} }
} }
@InternalSerializationApi @OptIn(InternalSerializationApi::class)
override fun serialize(encoder: Encoder, value: Plugin) { override fun serialize(encoder: Encoder, value: Plugin) {
val serializer = (value::class.serializerOrNull() ?: polymorphic) as KSerializer<Plugin> val serializer = (value::class.serializerOrNull() ?: polymorphic) as KSerializer<Plugin>
serializer.serialize(encoder, value) serializer.serialize(encoder, value)
} }
} }