Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
terrakok committed Dec 30, 2021
1 parent bd7c423 commit 2d22286
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ allprojects {
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}

// ./gradlew dependencyUpdates
apply(plugin = "com.github.ben-manes.versions")
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.ui.unit.dp
import io.ktor.client.*
import io.ktor.client.engine.okhttp.*
import io.ktor.client.request.*
import io.ktor.client.statement.*
import org.jetbrains.skia.Image

internal actual fun Modifier.systemStatusBarsHeight(additional: Dp): Modifier = this
Expand All @@ -30,7 +31,7 @@ internal actual fun _str(resName: String) = resName
private val httpClient = HttpClient(OkHttp)
private suspend fun loadImageBitmap(url: String): Result<ImageBitmap> {
return try {
val image = httpClient.get<ByteArray>(url)
val image = httpClient.get(url).readBytes()
Result.success(Image.makeFromEncoded(image).toComposeImageBitmap())
} catch (e: Exception) {
Result.failure(e)
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ plugin-gver = "0.39.0"

kotlinx-serialization = "1.3.2"
kotlinx-coroutines = "1.6.0-native-mt"
ktor = "1.6.7"
ktor = "2.0.0-beta-1"
napier = "2.3.0"
multiplatform-settings = "0.8.1"
voyager = "1.0.0-beta14"
koin = "3.1.4"
accompanist = "0.20.0"
coil = "1.4.0"
accompanist = "0.22.0-rc"
coil = "2.0.0-alpha06"
activity-compose = "1.4.0"
work-runtime-ktx = "2.7.1"
desugar-jdk-libs = "1.1.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.github.jetbrains.rssreader.core
import io.github.aakira.napier.Napier
import io.ktor.client.*
import io.ktor.client.engine.okhttp.*
import io.ktor.client.features.logging.*
import io.ktor.client.plugins.logging.*
import java.util.concurrent.TimeUnit

internal fun AndroidHttpClient(withLog: Boolean) = HttpClient(OkHttp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal class FeedLoader(
private val parser: FeedParser
) {
suspend fun getFeed(url: String, isDefault: Boolean): Feed {
val xml = httpClient.get<HttpResponse>(url).readText()
val xml = httpClient.get(url).bodyAsText()
return parser.parse(url, xml, isDefault)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package com.github.jetbrains.rssreader.core

import io.github.aakira.napier.Napier
import io.ktor.client.*
import io.ktor.client.engine.ios.*
import io.ktor.client.features.logging.*
import io.ktor.client.engine.darwin.*
import io.ktor.client.plugins.logging.*

internal fun IosHttpClient(withLog: Boolean) = HttpClient(Ios) {
internal fun IosHttpClient(withLog: Boolean) = HttpClient(Darwin) {
engine {
configureRequest {
setAllowsCellularAccess(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.github.jetbrains.rssreader.core
import io.github.aakira.napier.Napier
import io.ktor.client.*
import io.ktor.client.engine.js.*
import io.ktor.client.features.logging.*
import io.ktor.client.plugins.logging.*

internal fun jsHttpClient(withLog: Boolean) = HttpClient(Js) {
if (withLog) install(Logging) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.github.jetbrains.rssreader.core
import io.github.aakira.napier.Napier
import io.ktor.client.*
import io.ktor.client.engine.okhttp.*
import io.ktor.client.features.logging.*
import io.ktor.client.plugins.logging.*
import java.util.concurrent.TimeUnit

internal fun JvmHttpClient(withLog: Boolean) = HttpClient(OkHttp) {
Expand Down

0 comments on commit 2d22286

Please sign in to comment.