update versions

This commit is contained in:
InsanusMokrassar 2020-12-02 14:08:19 +06:00
parent 18cdf4ffbe
commit 4fcdb6f728
5 changed files with 20 additions and 23 deletions

View File

@ -2,6 +2,12 @@
## 0.6.2
* Versions updates:
* `Kotlin`: `1.4.10` -> `1.4.20`
* `Kotlin Serialisation`: `1.0.0-RC2` -> `1.0.1`
* `Kotlin Coroutines`: `1.3.9` -> `1.4.2`
* `Klock`: `1.12.1` -> `2.0.0`
## 0.6.1
* Versions updates:

View File

@ -44,7 +44,7 @@ kotlin {
implementation kotlin('stdlib')
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
api "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialisation_runtime_version"
api "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlin_serialisation_version"
api "com.soywiz.korlibs.klock:klock:$klock_version"
api "io.ktor:ktor-client-core:$ktor_version"
}
@ -55,18 +55,13 @@ kotlin {
implementation kotlin('test-annotations-common')
}
}
jvmMain {
dependencies {
implementation kotlin('stdlib')
}
}
jvmTest {
dependencies {
implementation kotlin('test-junit')
implementation "io.ktor:ktor-client-okhttp:$ktor_version"
}
}
jsMain {
jsTest {
dependencies {
implementation kotlin('test-js')
}

View File

@ -1,8 +1,8 @@
kotlin.code.style=official
kotlin_version=1.4.10
kotlin_coroutines_version=1.3.9
kotlin_serialisation_runtime_version=1.0.0-RC2
klock_version=1.12.1
kotlin_version=1.4.20
kotlin_coroutines_version=1.4.2
kotlin_serialisation_version=1.0.1
klock_version=2.0.0
ktor_version=1.4.1
gradle_github_release_plugin_version=2.2.12

View File

@ -9,7 +9,6 @@ import io.ktor.http.HttpStatusCode.Companion.TooManyRequests
import io.ktor.utils.io.errors.IOException
internal suspend fun ClientRequestException.sauceNaoAPIException(): Exception {
val response = response ?: return this
return when (response.status) {
TooManyRequests -> {
val answerContent = response.readText()
@ -20,7 +19,7 @@ internal suspend fun ClientRequestException.sauceNaoAPIException(): Exception {
}
else -> this
}
}
}
sealed class TooManyRequestsException(message: String, cause: Throwable? = null) : IOException(message, cause) {
abstract val answerContent: String

View File

@ -7,11 +7,8 @@ import kotlinx.serialization.builtins.serializer
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.json.*
@Serializer(String::class)
object CommonMultivariantStringSerializer : KSerializer<String> by String.serializer() {
private val stringArraySerializer = ListSerializer(String.serializer())
override fun deserialize(decoder: Decoder): String {
return when (val parsed = JsonElement.serializer().deserialize(decoder)) {
is JsonPrimitive -> parsed.content