Skip to content

Commit

Permalink
Bump dependencies (#792)
Browse files Browse the repository at this point in the history
* Bump compile and target SDK for Android

* Bump dependencies

* Handle nullable version name in `ApplicationComponent`

* Set default cache strategy in `FavIconImageLoader`

* Use `rememberModalBottomSheetState` in `FeedInfoBottomSheet`

* Fix errors in `FavIconFetcher`

* Use `rememberModalBottomSheetState` in `GroupSelectionSheet`

* Run spotless apply

* Disable native cache kind
  • Loading branch information
msasikanth authored Feb 20, 2025
1 parent 0246e18 commit d2a648f
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 48 deletions.
4 changes: 4 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
org.gradle.jvmargs=-Xmx4096M -Dkotlin.daemon.jvm.options\="-Xmx4096M"
#Kotlin
kotlin.code.style=official
kotlin.native.cacheKind=none
#MPP
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true
Expand Down
59 changes: 29 additions & 30 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
[versions]
kotlin = "2.0.21"
kotlin = "2.1.10"
android_gradle_plugin = "8.8.1"
compose = "1.7.0"
compose = "1.8.0-alpha03"
compose_material_icons_extended = "1.7.3"

android_sdk_compile = "34"
android_sdk_target = "34"
android_sdk_compile = "35"
android_sdk_target = "35"
android_sdk_min = "26"

sqldelight = "2.0.2"
ktor = "2.3.12"
kotlinx_coroutines = "1.9.0"
kotlinx_date_time = "0.6.1"
ktor = "2.3.13"
kotlinx_coroutines = "1.10.1"
kotlinx_date_time = "0.6.2"
kotlinx_immutable_collections = "0.3.8"
kotlinx_serialization_json = "1.7.3"
kotlinx_serialization_json = "1.8.0"
decompose = "3.0.0"
essenty = "2.1.0"
androidx_activity = "1.9.2"
essenty = "2.4.0"
androidx_activity = "1.10.0"
androidx_appcompat = "1.7.0"
androidx_core = "1.13.1"
androidx_collection = "1.4.4"
androidx_core = "1.15.0"
androidx_collection = "1.4.5"
androidx_test_runner = "1.6.2"
androidx_test_rules = "1.6.1"
androidx_work = "2.9.1"
androidx_datastore = "1.1.1"
androidx_work = "2.10.0"
androidx_datastore = "1.1.2"
androidx_browser = "1.8.0"
androidx_annotation = "1.8.2"
coil = "3.0.0-alpha09"
spotless = "6.25.0"
androidx_annotation = "1.9.1"
coil = "3.1.0"
spotless = "7.0.0"
ktfmt = "0.44"
kotlininject = "0.7.2"
ksp = "2.0.21-1.0.25"
ksp = "2.1.10-1.0.30"
material_color_utilities = "1.0.0-alpha01"
ksoup = "0.1.2"
sqliteAndroid = "3.45.0"
windowSizeClass = "0.5.0"
desugarJdk = "2.1.2"
desugarJdk = "2.1.4"
lyricist = "1.7.0"
atomicfu = "0.25.0"
okio = "3.9.1"
atomicfu = "0.27.0"
okio = "3.10.2"
paging = "3.3.0-alpha02-0.5.1"
stately = "2.1.0"
xmlutil = "0.90.1"
xmlutil = "0.90.3"
ktxml = "0.3.2"
uri = "0.0.18"
webview = "1.9.40-alpha03"
webview = "1.9.40"
uuid = "0.8.4"
bugsnag-plugin = "8.1.0"
bugsnag = "6.8.0"
bugsnag-plugin = "8.2.0"
bugsnag = "6.12.0"
crashkios-bugsnag = "0.9.0"
kermit = "2.0.4"
reorderable = "2.3.3"
kermit = "2.0.5"
reorderable = "2.4.3"
korlibs = "6.0.0"
filekit = "0.8.8"

Expand All @@ -60,7 +60,7 @@ compose_ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "compose" }
compose_ui_util = { module = "org.jetbrains.compose.ui:ui-util", version.ref = "compose" }
compose_material = { module = "org.jetbrains.compose.material:material", version.ref = "compose" }
compose_material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "compose" }
compose_material_icons_extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "compose" }
compose_material_icons_extended = { module = "org.jetbrains.compose.material:material-icons-extended", version.ref = "compose_material_icons_extended" }
compose_resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "compose" }
ktor_core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor_client_okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
Expand Down Expand Up @@ -114,7 +114,6 @@ stately-iso-collections = { module = "co.touchlab:stately-iso-collections", vers
xmlutil-core = { module = "io.github.pdvrieze.xmlutil:core", version.ref = "xmlutil" }
xmlutil-serialization = { module = "io.github.pdvrieze.xmlutil:serialization", version.ref = "xmlutil" }
ktxml = { module = "org.kobjects.ktxml:core", version.ref = "ktxml" }
uri = { module = "com.eygraber:uri-kmp", version.ref = "uri" }
webview = { module = "io.github.kevinnzou:compose-webview-multiplatform", version.ref = "webview" }
uuid = { module = "com.benasher44:uuid", version.ref = "uuid" }
bugsnag = { module = "com.bugsnag:bugsnag-android", version.ref = "bugsnag" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ abstract class ApplicationComponent(@get:Provides val context: Context) :
}

return AppInfo(
versionName = packageInfo.versionName,
versionName = packageInfo.versionName ?: "0.0.1",
versionCode = versionCode,
isDebugBuild = (applicationInfo.flags and FLAG_DEBUGGABLE) != 0,
cachePath = { context.cacheDir.absolutePath }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import coil3.fetch.FetchResult
import coil3.fetch.Fetcher
import coil3.fetch.SourceFetchResult
import coil3.getExtra
import coil3.network.CacheResponse
import coil3.network.CacheStrategy
import coil3.network.ConnectivityChecker
import coil3.network.HttpException
import coil3.network.NetworkClient
import coil3.network.NetworkFetcher
Expand Down Expand Up @@ -68,25 +68,24 @@ class FavIconFetcher(
val snapshot = readFromDiskCache()
try {
// Fast path: fetch the fav icon from the disk cache without performing a network request.
var output: CacheStrategy.Output? = null
var output: CacheStrategy.ReadResult? = null
if (snapshot != null) {
var cacheResponse = snapshot.toCacheResponse()
if (cacheResponse != null) {
val input = CacheStrategy.Input(cacheResponse, newRequest(), options)
output = cacheStrategy.value.compute(input)
cacheResponse = output.cacheResponse
output = cacheStrategy.value.read(cacheResponse, newRequest(), options)
cacheResponse = output.response
}
if (cacheResponse != null) {
return SourceFetchResult(
source = snapshot.toImageSource(),
mimeType = getMimeType(url, cacheResponse.responseHeaders[CONTENT_TYPE]),
mimeType = getMimeType(url, cacheResponse.headers[CONTENT_TYPE]),
dataSource = DataSource.DISK,
)
}
}

// Slow path: fetch the fav icon by parsing response HTML
val networkRequest = output?.networkRequest ?: newRequest()
val networkRequest = output?.request ?: newRequest()
return executeNetworkRequest(networkRequest) { response ->
// Write the response to the disk cache then open a new snapshot.
val responseBody = checkNotNull(response.body) { "body == null" }
Expand Down Expand Up @@ -207,9 +206,9 @@ class FavIconFetcher(
return contentType?.substringBefore(';')
}

private fun DiskCache.Snapshot.toCacheResponse(): CacheResponse? {
private fun DiskCache.Snapshot.toCacheResponse(): NetworkResponse? {
return try {
fileSystem.read(metadata) { CacheResponse(this) }
fileSystem.read(metadata) { NetworkResponse(body = NetworkResponseBody(this)) }
} catch (_: IOException) {
// If we can't parse the metadata, ignore this entry.
null
Expand Down Expand Up @@ -283,6 +282,7 @@ class FavIconFetcher(
networkClient = networkClientLazy,
diskCache = diskCacheLazy,
cacheStrategy = cacheStrategyLazy,
connectivityChecker = ConnectivityChecker.ONLINE
)
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object FavIconImageLoader {
add(
FavIconFetcher.Factory(
networkClient = { HttpClient().asNetworkClient() },
cacheStrategy = { CacheStrategy() }
cacheStrategy = { CacheStrategy.DEFAULT }
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.SheetState
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
Expand All @@ -69,7 +69,6 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.style.TextAlign
Expand Down Expand Up @@ -126,7 +125,7 @@ fun FeedInfoBottomSheet(
.only(WindowInsetsSides.Bottom)
.union(WindowInsets.ime.only(WindowInsetsSides.Bottom))
},
sheetState = SheetState(skipPartiallyExpanded = true, density = LocalDensity.current),
sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true),
scrimColor = SYSTEM_SCRIM
) {
Column(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.SheetState
import androidx.compose.material3.Text
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
Expand All @@ -51,7 +51,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp
import app.cash.paging.compose.collectAsLazyPagingItems
import dev.sasikanth.rss.reader.components.Button
Expand Down Expand Up @@ -79,7 +78,7 @@ fun GroupSelectionSheet(presenter: GroupSelectionPresenter, modifier: Modifier =
.only(WindowInsetsSides.Bottom)
.union(WindowInsets.ime.only(WindowInsetsSides.Bottom))
},
sheetState = SheetState(skipPartiallyExpanded = true, density = LocalDensity.current),
sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true),
scrimColor = SYSTEM_SCRIM
) {
val state by presenter.state.collectAsState()
Expand Down

0 comments on commit d2a648f

Please sign in to comment.