Skip to content

Commit b759a31

Browse files
authored
Update dependencies (#754)
* Update libs * Use stringResource to access local resource string * Unify androidx-lifecycle-nav3 version * Use stringResource to access local resource string Signed-off-by: Sunik Kupfer <[email protected]> * Use resId in Toast.makeText Signed-off-by: Sunik Kupfer <[email protected]> --------- Signed-off-by: Sunik Kupfer <[email protected]>
1 parent ecce23a commit b759a31

File tree

6 files changed

+27
-32
lines changed

6 files changed

+27
-32
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ dependencies {
154154
implementation(libs.compose.ui.toolingPreview)
155155
implementation(libs.compose.runtime.livedata)
156156

157+
implementation(libs.aboutLibs.core)
157158
implementation(libs.aboutLibs.compose)
159+
implementation(libs.aboutLibs.compose.core)
158160
implementation(libs.jodaTime)
159161

160162
implementation(libs.ktor.core)

app/src/main/java/at/bitfire/icsdroid/ui/nav/MainApp.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import androidx.core.os.BundleCompat
2020
import androidx.lifecycle.viewmodel.navigation3.rememberViewModelStoreNavEntryDecorator
2121
import androidx.navigation3.runtime.entryProvider
2222
import androidx.navigation3.runtime.rememberNavBackStack
23-
import androidx.navigation3.runtime.rememberSavedStateNavEntryDecorator
24-
import androidx.navigation3.scene.rememberSceneSetupNavEntryDecorator
23+
import androidx.navigation3.runtime.rememberSaveableStateHolderNavEntryDecorator
2524
import androidx.navigation3.ui.NavDisplay
2625
import at.bitfire.icsdroid.MainActivity.Companion.EXTRA_ERROR_MESSAGE
2726
import at.bitfire.icsdroid.MainActivity.Companion.EXTRA_REQUEST_CALENDAR_PERMISSION
@@ -103,8 +102,7 @@ fun MainApp(
103102

104103
NavDisplay(
105104
entryDecorators = listOf(
106-
rememberSceneSetupNavEntryDecorator(),
107-
rememberSavedStateNavEntryDecorator(),
105+
rememberSaveableStateHolderNavEntryDecorator(),
108106
rememberViewModelStoreNavEntryDecorator()
109107
),
110108
backStack = backStack,

app/src/main/java/at/bitfire/icsdroid/ui/screen/AddSubscriptionScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fun AddSubscriptionScreen(
6969
LaunchedEffect(uiState) {
7070
if (uiState.success) {
7171
// on success, show notification and close activity
72-
Toast.makeText(context, context.getString(R.string.add_calendar_created), Toast.LENGTH_LONG).show()
72+
Toast.makeText(context, R.string.add_calendar_created, Toast.LENGTH_LONG).show()
7373
onBackRequested()
7474
}
7575
uiState.errorMessage?.let {

app/src/main/java/at/bitfire/icsdroid/ui/screen/InfoScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import at.bitfire.icsdroid.service.ComposableStartupService.Companion.FLAG_DONAT
4848
import at.bitfire.icsdroid.ui.partials.ExtendedTopAppBar
4949
import at.bitfire.icsdroid.ui.partials.GenericAlertDialog
5050
import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer
51-
import com.mikepenz.aboutlibraries.ui.compose.rememberLibraries
51+
import com.mikepenz.aboutlibraries.ui.compose.produceLibraries
5252
import kotlinx.coroutines.runBlocking
5353
import java.util.ServiceLoader
5454

@@ -104,7 +104,7 @@ fun InfoScreen(
104104
)
105105
}
106106
) { contentPadding ->
107-
val libraries by rememberLibraries {
107+
val libraries by produceLibraries {
108108
resources.openRawResource(R.raw.aboutlibraries).bufferedReader().use { input ->
109109
input.readText()
110110
}

app/src/main/java/at/bitfire/icsdroid/ui/views/EnterUrlComposable.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import androidx.compose.runtime.rememberCoroutineScope
4545
import androidx.compose.ui.Alignment
4646
import androidx.compose.ui.Modifier
4747
import androidx.compose.ui.graphics.Color
48-
import androidx.compose.ui.platform.LocalContext
4948
import androidx.compose.ui.res.stringResource
5049
import androidx.compose.ui.text.font.FontWeight
5150
import androidx.compose.ui.text.input.ImeAction
@@ -83,8 +82,6 @@ fun EnterUrlComposable(
8382
onPickFileRequested: () -> Unit,
8483
onSubmit: () -> Unit
8584
) {
86-
val context = LocalContext.current
87-
8885
validationResult?.exception?.let { exception ->
8986
val errorMessage = exception.localizedMessage ?: exception.message ?: exception.toString()
9087
AlertDialog(
@@ -94,10 +91,11 @@ fun EnterUrlComposable(
9491

9592
val snackbarHostState = remember { SnackbarHostState() }
9693

94+
val addCalendarValidatingString = stringResource(R.string.add_calendar_validating)
9795
LaunchedEffect(isVerifyingUrl) {
9896
if (isVerifyingUrl) {
9997
snackbarHostState.showSnackbar(
100-
context.getString(R.string.add_calendar_validating),
98+
addCalendarValidatingString,
10199
duration = SnackbarDuration.Indefinite
102100
)
103101
} else {

gradle/libs.versions.toml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
[versions]
2-
aboutLibs = "12.2.4"
3-
agp = "8.13.0"
4-
androidx-activityCompose = "1.11.0"
2+
aboutLibs = "13.1.0"
3+
agp = "8.13.1"
4+
androidx-activityCompose = "1.12.1"
55
androidx-appCompat = "1.7.1"
66
androidx-archCore = "2.2.0"
77
androidx-core = "1.17.0"
88
androidx-hilt = "1.3.0"
9-
androidx-lifecycle = "2.9.4"
10-
# should be replaced by androidx-lifecycle once nav3 is stable (probably 2.10.0?)
11-
androidx-lifecycle-nav3 = "2.10.0-alpha04"
12-
androidx-nav3 = "1.0.0-alpha10"
9+
androidx-lifecycle = "2.10.0"
10+
androidx-nav3 = "1.0.0"
1311
androidx-test-junit = "1.3.0"
1412
androidx-test-rules = "1.7.0"
1513
androidx-test-runner = "1.7.0"
16-
androidx-work = "2.10.5"
14+
androidx-work = "2.11.0"
1715
bitfire-cert4android = "41009d4"
1816
bitfire-synctools = "7aa709f6b6"
1917
compose-dialogs = "1.3.0"
2018
compose-material = "1.7.8"
2119
compose-material3 = "1.4.0"
22-
compose-runtime = "1.9.2"
23-
compose-ui = "1.9.2"
24-
datastore = "1.1.7"
20+
compose-runtime = "1.10.0"
21+
compose-ui = "1.10.0"
22+
datastore = "1.2.0"
2523
desugaring = "2.1.5"
2624
hilt = "2.57.2"
2725
joda-time = "2.14.0"
2826
junit = "4.13.2"
29-
kotlin = "2.2.20"
27+
kotlin = "2.2.21"
3028
kotlinx-coroutines = "1.10.2"
3129
kotlinx-serialization-core = "1.9.0"
32-
ksp = "2.2.20-2.0.3"
33-
ktor = "3.3.0"
34-
okhttp = "5.1.0"
35-
room = "2.8.1"
30+
ksp = "2.3.3"
31+
ktor = "3.3.3"
32+
okhttp = "5.3.2"
33+
room = "2.8.4"
3634

3735
[libraries]
36+
aboutLibs-core = { module = "com.mikepenz:aboutlibraries-core", version.ref = "aboutLibs" }
37+
aboutLibs-compose-core = { module = "com.mikepenz:aboutlibraries-compose-core", version.ref = "aboutLibs" }
3838
aboutLibs-compose = { module = "com.mikepenz:aboutlibraries-compose-m3", version.ref = "aboutLibs" }
3939
androidx-activityCompose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
4040
androidx-appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appCompat" }
@@ -46,7 +46,7 @@ androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-com
4646
androidx-hilt-work = { module = "androidx.hilt:hilt-work", version.ref = "androidx-hilt" }
4747
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" }
4848
androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" }
49-
androidx-lifecycle-viewmodel-navigation3 = { module = "androidx.lifecycle:lifecycle-viewmodel-navigation3", version.ref = "androidx-lifecycle-nav3" }
49+
androidx-lifecycle-viewmodel-navigation3 = { module = "androidx.lifecycle:lifecycle-viewmodel-navigation3", version.ref = "androidx-lifecycle" }
5050
androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" }
5151
androidx-navigation3-runtime = { module = "androidx.navigation3:navigation3-runtime", version.ref = "androidx-nav3" }
5252
androidx-navigation3-ui = { module = "androidx.navigation3:navigation3-ui", version.ref = "androidx-nav3" }
@@ -75,15 +75,12 @@ jodaTime = { module = "joda-time:joda-time", version.ref = "joda-time" }
7575
junit = { module = "junit:junit", version.ref = "junit" }
7676
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
7777
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization-core" }
78-
okhttp-base = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
79-
okhttp-coroutines = { module = "com.squareup.okhttp3:okhttp-coroutines", version.ref = "okhttp" }
8078
okhttp-brotli = { module = "com.squareup.okhttp3:okhttp-brotli", version.ref = "okhttp" }
81-
okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }
8279
room-base = { module = "androidx.room:room-ktx", version.ref = "room" }
8380
room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
8481

8582
[plugins]
86-
aboutLibs = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutLibs" }
83+
aboutLibs = { id = "com.mikepenz.aboutlibraries.plugin.android", version.ref = "aboutLibs" }
8784
android-application = { id = "com.android.application", version.ref = "agp" }
8885
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
8986
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }

0 commit comments

Comments
 (0)