From 5dda32bb8143abe4e495fb7a5693299ac9f4da41 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 29 Nov 2023 16:44:49 -0500 Subject: [PATCH] Bump dependencies --- .github/workflows/build_pull_request.yml | 2 +- .github/workflows/build_push.yml | 2 +- .../settings/screen/debug/DebugInfoScreen.kt | 1 - .../settings/screen/debug/WorkerInfoScreen.kt | 25 +++++++++++++------ .../ui/browse/migration/MigrationFlags.kt | 1 - gradle/androidx.versions.toml | 2 +- gradle/compose.versions.toml | 2 +- gradle/libs.versions.toml | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 9 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml index da79440dc..5a7bfdd10 100644 --- a/.github/workflows/build_pull_request.yml +++ b/.github/workflows/build_pull_request.yml @@ -28,7 +28,7 @@ jobs: uses: actions/dependency-review-action@v3 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 17 distribution: adopt diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index e43c229a0..6127d3f30 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -23,7 +23,7 @@ jobs: uses: gradle/wrapper-validation-action@v1 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 17 distribution: adopt diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/DebugInfoScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/DebugInfoScreen.kt index b4be0ebd9..3eecee438 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/DebugInfoScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/DebugInfoScreen.kt @@ -13,7 +13,6 @@ import eu.kanade.presentation.more.settings.Preference import eu.kanade.presentation.more.settings.PreferenceScaffold import eu.kanade.presentation.more.settings.screen.about.AboutScreen import eu.kanade.presentation.util.Screen -import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.system.DeviceUtil import eu.kanade.tachiyomi.util.system.WebViewUtil import kotlinx.coroutines.guava.await diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/WorkerInfoScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/WorkerInfoScreen.kt index 2c891e271..ea8db81e8 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/WorkerInfoScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/WorkerInfoScreen.kt @@ -18,17 +18,18 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.unit.dp import androidx.compose.ui.util.fastForEach -import androidx.lifecycle.asFlow import androidx.work.WorkInfo import androidx.work.WorkQuery import cafe.adriel.voyager.core.model.ScreenModel import cafe.adriel.voyager.core.model.rememberScreenModel import cafe.adriel.voyager.navigator.LocalNavigator import cafe.adriel.voyager.navigator.currentOrThrow +import eu.kanade.domain.ui.UiPreferences import eu.kanade.presentation.components.AppBar import eu.kanade.presentation.components.AppBarActions import eu.kanade.presentation.util.Screen import eu.kanade.presentation.util.ioCoroutineScope +import eu.kanade.tachiyomi.util.lang.toDateTimestampString import eu.kanade.tachiyomi.util.system.copyToClipboard import eu.kanade.tachiyomi.util.system.workManager import kotlinx.collections.immutable.persistentListOf @@ -39,6 +40,9 @@ import tachiyomi.i18n.MR import tachiyomi.presentation.core.components.material.Scaffold import tachiyomi.presentation.core.i18n.stringResource import tachiyomi.presentation.core.util.plus +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.api.get +import java.util.Date class WorkerInfoScreen : Screen() { @@ -116,22 +120,19 @@ class WorkerInfoScreen : Screen() { private val workManager = context.workManager val finished = workManager - .getWorkInfosLiveData( + .getWorkInfosFlow( WorkQuery.fromStates(WorkInfo.State.SUCCEEDED, WorkInfo.State.FAILED, WorkInfo.State.CANCELLED), ) - .asFlow() .map(::constructString) .stateIn(ioCoroutineScope, SharingStarted.WhileSubscribed(), "") val running = workManager - .getWorkInfosLiveData(WorkQuery.fromStates(WorkInfo.State.RUNNING)) - .asFlow() + .getWorkInfosFlow(WorkQuery.fromStates(WorkInfo.State.RUNNING)) .map(::constructString) .stateIn(ioCoroutineScope, SharingStarted.WhileSubscribed(), "") val enqueued = workManager - .getWorkInfosLiveData(WorkQuery.fromStates(WorkInfo.State.ENQUEUED)) - .asFlow() + .getWorkInfosFlow(WorkQuery.fromStates(WorkInfo.State.ENQUEUED)) .map(::constructString) .stateIn(ioCoroutineScope, SharingStarted.WhileSubscribed(), "") @@ -146,6 +147,16 @@ class WorkerInfoScreen : Screen() { appendLine(" - $it") } appendLine("State: ${workInfo.state}") + if (workInfo.state == WorkInfo.State.ENQUEUED) { + appendLine( + "Next scheduled run: ${Date(workInfo.nextScheduleTimeMillis).toDateTimestampString( + UiPreferences.dateFormat( + Injekt.get().dateFormat().get(), + ), + )}", + ) + appendLine("Attempt #${workInfo.runAttemptCount + 1}") + } appendLine() } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/MigrationFlags.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/MigrationFlags.kt index c79c111fc..3064ad60f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/MigrationFlags.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/MigrationFlags.kt @@ -6,7 +6,6 @@ import eu.kanade.tachiyomi.data.cache.CoverCache import eu.kanade.tachiyomi.data.download.DownloadCache import tachiyomi.domain.manga.model.Manga import tachiyomi.i18n.MR -import uy.kohesive.injekt.api.get import uy.kohesive.injekt.injectLazy data class MigrationFlag( diff --git a/gradle/androidx.versions.toml b/gradle/androidx.versions.toml index 7ef758874..5d7aead08 100644 --- a/gradle/androidx.versions.toml +++ b/gradle/androidx.versions.toml @@ -20,7 +20,7 @@ lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle_version" } lifecycle-runtimektx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle_version" } -workmanager = "androidx.work:work-runtime-ktx:2.8.1" +workmanager = "androidx.work:work-runtime:2.9.0" paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "paging_version" } paging-compose = { module = "androidx.paging:paging-compose", version.ref = "paging_version" } diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index ce7b074bf..6ccce2b06 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -1,5 +1,5 @@ [versions] -compiler = "1.5.4" +compiler = "1.5.5" compose-bom = "2023.12.00-alpha02" accompanist = "0.33.2-alpha" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fa08d896a..3cd0e3da7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -26,7 +26,7 @@ conscrypt-android = "org.conscrypt:conscrypt-android:2.5.2" quickjs-android = "app.cash.quickjs:quickjs-android:0.9.2" -jsoup = "org.jsoup:jsoup:1.16.2" +jsoup = "org.jsoup:jsoup:1.17.1" disklrucache = "com.jakewharton:disklrucache:2.0.2" unifile = "com.github.tachiyomiorg:unifile:7c257e1c64" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3fa8f862f..1af9e0930 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME