diff --git a/build-logic/plugins/convention/src/main/kotlin/flipper.android-app-multiplatform.gradle.kts b/build-logic/plugins/convention/src/main/kotlin/flipper.android-app-multiplatform.gradle.kts index ce288aead3..faef18c1d3 100644 --- a/build-logic/plugins/convention/src/main/kotlin/flipper.android-app-multiplatform.gradle.kts +++ b/build-logic/plugins/convention/src/main/kotlin/flipper.android-app-multiplatform.gradle.kts @@ -1,9 +1,6 @@ import com.android.build.gradle.BaseExtension import com.flipperdevices.buildlogic.ApkConfig import com.flipperdevices.buildlogic.ApkConfig.IS_SENTRY_PUBLISH -import gradle.kotlin.dsl.accessors._7a4d13f58a317316fed3ebe1f66c7d31.compose -import gradle.kotlin.dsl.accessors._7a4d13f58a317316fed3ebe1f66c7d31.kotlin -import gradle.kotlin.dsl.accessors._7a4d13f58a317316fed3ebe1f66c7d31.sourceSets import io.sentry.android.gradle.extensions.SentryPluginExtension import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.JvmTarget diff --git a/components/analytics/shake2report/impl/src/main/java/com/flipperdevices/analytics/shake2report/impl/viewmodel/Shake2ReportViewModel.kt b/components/analytics/shake2report/impl/src/main/java/com/flipperdevices/analytics/shake2report/impl/viewmodel/Shake2ReportViewModel.kt index bfaa8248f4..74b673c97a 100644 --- a/components/analytics/shake2report/impl/src/main/java/com/flipperdevices/analytics/shake2report/impl/viewmodel/Shake2ReportViewModel.kt +++ b/components/analytics/shake2report/impl/src/main/java/com/flipperdevices/analytics/shake2report/impl/viewmodel/Shake2ReportViewModel.kt @@ -26,9 +26,10 @@ import net.lingala.zip4j.model.enums.CompressionLevel import net.lingala.zip4j.model.enums.CompressionMethod import java.io.File import javax.inject.Inject -import kotlin.time.Duration.Companion.minutes +import kotlin.time.DurationUnit +import kotlin.time.toDuration -private val SENTRY_TIMEOUT = 5.minutes +private val SENTRY_TIMEOUT = 5.toDuration(DurationUnit.MINUTES) class Shake2ReportViewModel @Inject constructor( private val application: Application, diff --git a/components/bridge/connection/feature/emulate/impl/build.gradle.kts b/components/bridge/connection/feature/emulate/impl/build.gradle.kts index c704f116c5..fe5cabf240 100644 --- a/components/bridge/connection/feature/emulate/impl/build.gradle.kts +++ b/components/bridge/connection/feature/emulate/impl/build.gradle.kts @@ -34,7 +34,5 @@ commonTestDependencies { implementation(projects.components.core.test) implementation(libs.junit) implementation(libs.kotlin.coroutines.test) - implementation(libs.roboelectric) - implementation(libs.ktx.testing) implementation(libs.mockk) } diff --git a/components/bridge/connection/feature/protocolversion/api/src/commonMain/kotlin/com/flipperdevices/bridge/connection/feature/protocolversion/api/FVersionFeatureApi.kt b/components/bridge/connection/feature/protocolversion/api/src/commonMain/kotlin/com/flipperdevices/bridge/connection/feature/protocolversion/api/FVersionFeatureApi.kt index e59edd96b1..ea302f8b9f 100644 --- a/components/bridge/connection/feature/protocolversion/api/src/commonMain/kotlin/com/flipperdevices/bridge/connection/feature/protocolversion/api/FVersionFeatureApi.kt +++ b/components/bridge/connection/feature/protocolversion/api/src/commonMain/kotlin/com/flipperdevices/bridge/connection/feature/protocolversion/api/FVersionFeatureApi.kt @@ -5,9 +5,10 @@ import com.flipperdevices.bridge.connection.feature.protocolversion.model.Flippe import com.flipperdevices.core.data.SemVer import kotlinx.coroutines.flow.StateFlow import kotlin.time.Duration -import kotlin.time.Duration.Companion.seconds +import kotlin.time.DurationUnit +import kotlin.time.toDuration -private val VERSION_WAITING_TIMEOUT = 30.seconds +private val VERSION_WAITING_TIMEOUT = 30.toDuration(DurationUnit.SECONDS) interface FVersionFeatureApi : FDeviceFeatureApi { fun getVersionInformationFlow(): StateFlow diff --git a/components/bridge/connection/pbutils/build.gradle.kts b/components/bridge/connection/pbutils/build.gradle.kts index 4f4d3d1c4c..0a6dbf92e8 100644 --- a/components/bridge/connection/pbutils/build.gradle.kts +++ b/components/bridge/connection/pbutils/build.gradle.kts @@ -1,3 +1,6 @@ +import io.gitlab.arturbosch.detekt.Detekt +import org.gradle.kotlin.dsl.withType + plugins { id("flipper.multiplatform") id("flipper.multiplatform-dependencies") @@ -19,3 +22,7 @@ commonDependencies { implementation(projects.components.core.ktx) implementation(libs.okio) } + +tasks.withType { + enabled = false +} diff --git a/components/bridge/connection/sample/android/build.gradle.kts b/components/bridge/connection/sample/android/build.gradle.kts index e76cdf6766..684e26c89a 100644 --- a/components/bridge/connection/sample/android/build.gradle.kts +++ b/components/bridge/connection/sample/android/build.gradle.kts @@ -23,5 +23,5 @@ androidDependencies { } dependencies { - commonKsp(libs.dagger.compiler) + ksp(libs.dagger.compiler) } diff --git a/components/bridge/connection/sample/desktop/build.gradle.kts b/components/bridge/connection/sample/desktop/build.gradle.kts index d63c9d1844..2a8668ca22 100644 --- a/components/bridge/connection/sample/desktop/build.gradle.kts +++ b/components/bridge/connection/sample/desktop/build.gradle.kts @@ -12,14 +12,14 @@ plugins { } kotlin { - jvm("desktop") { - withJava() - } + jvm("desktop") sourceSets { val desktopMain by getting desktopMain.dependencies { implementation(compose.desktop.currentOs) + implementation(libs.dagger) + implementation(libs.anvil.utils.annotations) } } } @@ -46,7 +46,7 @@ compose.desktop { val patch = semVers.getOrNull(3) ?: semVers.getOrNull(2) ?: 0 - "${major}.${minor}.${patch}" + "$major.$minor.$patch" } } } @@ -65,12 +65,7 @@ anvil { ) } -dependencies { - "implementation"(libs.dagger) - "implementation"(libs.anvil.utils.annotations) - "commonKsp"(libs.anvil.utils.compiler) -} - dependencies { ksp(libs.dagger.compiler) + ksp(libs.anvil.utils.compiler) } diff --git a/components/bridge/connection/sample/shared/src/desktopMain/kotlin/com/flipperdevices/bridge/connection/screens/search/USBSearchViewModel.kt b/components/bridge/connection/sample/shared/src/desktopMain/kotlin/com/flipperdevices/bridge/connection/screens/search/USBSearchViewModel.kt index 68dc2443a2..da4b10d1bf 100644 --- a/components/bridge/connection/sample/shared/src/desktopMain/kotlin/com/flipperdevices/bridge/connection/screens/search/USBSearchViewModel.kt +++ b/components/bridge/connection/sample/shared/src/desktopMain/kotlin/com/flipperdevices/bridge/connection/screens/search/USBSearchViewModel.kt @@ -17,7 +17,8 @@ import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.flow import kotlinx.coroutines.launch import javax.inject.Inject -import kotlin.time.Duration.Companion.seconds +import kotlin.time.DurationUnit +import kotlin.time.toDuration private val FLIPPER_NAME_REGEXP = "Flipper ([A-Za-z]+)".toRegex() @@ -36,7 +37,7 @@ class USBSearchViewModel @Inject constructor( flow { while (true) { emit(Unit) - delay(1.seconds) + delay(1.toDuration(DurationUnit.SECONDS)) } }, persistedStorage.getAllDevices() diff --git a/components/bridge/dao/impl/src/main/java/com/flipperdevices/bridge/dao/impl/di/RoomDatabaseModule.kt b/components/bridge/dao/impl/src/main/java/com/flipperdevices/bridge/dao/impl/di/RoomDatabaseModule.kt index 47ea6521e0..9065a3faf7 100644 --- a/components/bridge/dao/impl/src/main/java/com/flipperdevices/bridge/dao/impl/di/RoomDatabaseModule.kt +++ b/components/bridge/dao/impl/src/main/java/com/flipperdevices/bridge/dao/impl/di/RoomDatabaseModule.kt @@ -35,7 +35,7 @@ class RoomDatabaseModule { AppDatabase::class.java, DATABASE_NAME ).addTypeConverter(databaseKeyContentConverter) - .fallbackToDestructiveMigration() + .fallbackToDestructiveMigration(true) .build() } diff --git a/components/core/build-konfig/build.gradle.kts b/components/core/build-konfig/build.gradle.kts index 202cbb1188..b88a930369 100644 --- a/components/core/build-konfig/build.gradle.kts +++ b/components/core/build-konfig/build.gradle.kts @@ -1,5 +1,7 @@ import com.flipperdevices.buildlogic.ApkConfig import com.flipperdevices.buildlogic.ApkConfig.CURRENT_FLAVOR_TYPE +import io.gitlab.arturbosch.detekt.Detekt +import org.gradle.kotlin.dsl.withType plugins { id("flipper.multiplatform") @@ -33,3 +35,7 @@ buildConfig { ApkConfig.ROBOELECTRIC_SDK_VERSION ) } + +tasks.withType { + enabled = false +} diff --git a/components/core/data/build.gradle.kts b/components/core/data/build.gradle.kts index 2411f31f33..5ab2549632 100644 --- a/components/core/data/build.gradle.kts +++ b/components/core/data/build.gradle.kts @@ -12,5 +12,4 @@ commonDependencies { commonTestDependencies { implementation(libs.junit) implementation(libs.mockito.kotlin) - implementation(libs.ktx.testing) } diff --git a/components/core/log/src/commonMain/kotlin/com/flipperdevices/core/log/LogTagProvider.common.kt b/components/core/log/src/commonMain/kotlin/com/flipperdevices/core/log/LogTagProvider.common.kt index 2a2f362525..bb6cca826c 100644 --- a/components/core/log/src/commonMain/kotlin/com/flipperdevices/core/log/LogTagProvider.common.kt +++ b/components/core/log/src/commonMain/kotlin/com/flipperdevices/core/log/LogTagProvider.common.kt @@ -1,3 +1,5 @@ +@file:Suppress("MatchingDeclarationName") + package com.flipperdevices.core.log @Suppress("PropertyName") diff --git a/components/core/markdown/src/main/java/com/flipperdevices/core/markdown/ComposableMarkdown.kt b/components/core/markdown/src/main/java/com/flipperdevices/core/markdown/ComposableMarkdown.kt index 110f5d0ab6..22d6415a0d 100644 --- a/components/core/markdown/src/main/java/com/flipperdevices/core/markdown/ComposableMarkdown.kt +++ b/components/core/markdown/src/main/java/com/flipperdevices/core/markdown/ComposableMarkdown.kt @@ -3,6 +3,7 @@ package com.flipperdevices.core.markdown import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.TextLinkStyles import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.dp @@ -10,6 +11,7 @@ import com.flipperdevices.core.ui.theme.LocalPallet import com.flipperdevices.core.ui.theme.LocalTypography import com.mikepenz.markdown.compose.Markdown import com.mikepenz.markdown.model.DefaultMarkdownColors +import com.mikepenz.markdown.model.DefaultMarkdownTypography import com.mikepenz.markdown.model.MarkdownColors import com.mikepenz.markdown.model.MarkdownPadding import com.mikepenz.markdown.model.MarkdownTypography @@ -49,7 +51,9 @@ fun markdownColors( codeBackground = backgroundCode, inlineCodeBackground = backgroundCode, dividerColor = dividerColor, - inlineCodeText = text + inlineCodeText = text, + tableText = text, + tableBackground = backgroundCode, ) @Composable @@ -71,21 +75,27 @@ fun markdownTypography( quoteStyle: TextStyle = LocalTypography.current.bodyR14, textStyle: TextStyle = LocalTypography.current.bodyR14 ): MarkdownTypography { - return object : MarkdownTypography { - override val bullet = bulletStyle.merge(additionalTextStyle) - override val code = codeStyle.merge(additionalTextStyle) - override val h1 = h1Style.merge(additionalTextStyle) - override val h2 = h2Style.merge(additionalTextStyle) - override val h3 = h3Style.merge(additionalTextStyle) - override val h4 = h4Style.merge(additionalTextStyle) - override val h5 = h5Style.merge(additionalTextStyle) - override val h6 = h6Style.merge(additionalTextStyle) - override val inlineCode = inlineCode.merge(additionalTextStyle) - override val link = linkStyle.merge(additionalTextStyle) - override val list = listStyle.merge(additionalTextStyle) - override val ordered = orderedStyle.merge(additionalTextStyle) - override val paragraph = paragraphStyle.merge(additionalTextStyle) - override val quote = quoteStyle.merge(additionalTextStyle) - override val text = textStyle.merge(additionalTextStyle) - } + return DefaultMarkdownTypography( + bullet = bulletStyle.merge(additionalTextStyle), + code = codeStyle.merge(additionalTextStyle), + h1 = h1Style.merge(additionalTextStyle), + h2 = h2Style.merge(additionalTextStyle), + h3 = h3Style.merge(additionalTextStyle), + h4 = h4Style.merge(additionalTextStyle), + h5 = h5Style.merge(additionalTextStyle), + h6 = h6Style.merge(additionalTextStyle), + inlineCode = inlineCode.merge(additionalTextStyle), + link = linkStyle.merge(additionalTextStyle), + list = listStyle.merge(additionalTextStyle), + ordered = orderedStyle.merge(additionalTextStyle), + paragraph = paragraphStyle.merge(additionalTextStyle), + quote = quoteStyle.merge(additionalTextStyle), + text = textStyle.merge(additionalTextStyle), + textLink = TextLinkStyles( + style = textStyle.merge(additionalTextStyle).copy( + textDecoration = TextDecoration.Underline, + ).toSpanStyle() + ), + table = textStyle.merge(additionalTextStyle) + ) } diff --git a/components/core/preference/build.gradle.kts b/components/core/preference/build.gradle.kts index 66d6347a04..ca501e4718 100644 --- a/components/core/preference/build.gradle.kts +++ b/components/core/preference/build.gradle.kts @@ -1,3 +1,6 @@ +import io.gitlab.arturbosch.detekt.Detekt +import org.gradle.kotlin.dsl.withType + plugins { id("flipper.multiplatform") id("flipper.multiplatform-dependencies") @@ -14,6 +17,10 @@ commonDependencies { api(libs.datastore) } +tasks.withType { + enabled = false +} + wire { kotlin { enumMode = "sealed_class" diff --git a/components/core/ui/hexkeyboard/build.gradle.kts b/components/core/ui/hexkeyboard/build.gradle.kts index 1a26c81bc5..8acaed9cd2 100644 --- a/components/core/ui/hexkeyboard/build.gradle.kts +++ b/components/core/ui/hexkeyboard/build.gradle.kts @@ -13,4 +13,5 @@ commonDependencies { // Compose implementation(libs.compose.constraint) + implementation(libs.compose.material.icons.core) } diff --git a/components/core/ui/ktx/build.gradle.kts b/components/core/ui/ktx/build.gradle.kts index e6c429414c..7f14a455bd 100644 --- a/components/core/ui/ktx/build.gradle.kts +++ b/components/core/ui/ktx/build.gradle.kts @@ -22,6 +22,7 @@ commonDependencies { } androidDependencies { - implementation(libs.image.lottie) + + implementation(libs.compose.material.icons.core) } diff --git a/components/deeplink/api/build.gradle.kts b/components/deeplink/api/build.gradle.kts index e83908f52d..20ae7bbb58 100644 --- a/components/deeplink/api/build.gradle.kts +++ b/components/deeplink/api/build.gradle.kts @@ -14,5 +14,8 @@ commonDependencies { implementation(libs.kotlin.serialization.json) implementation(libs.annotations) +} + +androidDependencies { implementation(libs.appcompat) } diff --git a/components/faphub/dao/network/src/main/java/com/flipperdevices/faphub/dao/network/network/utils/DateSerializer.kt b/components/faphub/dao/network/src/main/java/com/flipperdevices/faphub/dao/network/network/utils/DateSerializer.kt index 45018b1ddd..39dfe65bdb 100644 --- a/components/faphub/dao/network/src/main/java/com/flipperdevices/faphub/dao/network/network/utils/DateSerializer.kt +++ b/components/faphub/dao/network/src/main/java/com/flipperdevices/faphub/dao/network/network/utils/DateSerializer.kt @@ -1,6 +1,5 @@ package com.flipperdevices.faphub.dao.network.network.utils -import kotlinx.datetime.Instant import kotlinx.datetime.LocalDateTime import kotlinx.datetime.TimeZone import kotlinx.datetime.toInstant @@ -11,6 +10,7 @@ import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder +import kotlin.time.Instant object DateSerializer : KSerializer { override val descriptor: SerialDescriptor = diff --git a/components/faphub/fapscreen/impl/src/main/java/com/flipperdevices/faphub/fapscreen/impl/composable/ComposableFapScreen.kt b/components/faphub/fapscreen/impl/src/main/java/com/flipperdevices/faphub/fapscreen/impl/composable/ComposableFapScreen.kt index 4bd3f2a9f5..0d62897766 100644 --- a/components/faphub/fapscreen/impl/src/main/java/com/flipperdevices/faphub/fapscreen/impl/composable/ComposableFapScreen.kt +++ b/components/faphub/fapscreen/impl/src/main/java/com/flipperdevices/faphub/fapscreen/impl/composable/ComposableFapScreen.kt @@ -16,7 +16,6 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import androidx.core.content.ContextCompat import com.flipperdevices.core.ui.ktx.OrangeAppBar import com.flipperdevices.core.ui.ktx.clickableRipple import com.flipperdevices.core.ui.ktx.elements.SwipeRefresh @@ -175,8 +174,7 @@ private fun ComposableFapScreenBar( putExtra(Intent.EXTRA_TEXT, url) type = "text/plain" } - ContextCompat.startActivity( - context, + context.startActivity( Intent.createChooser(intent, shareTitle), null ) diff --git a/components/faphub/screenshotspreview/impl/src/main/kotlin/com/flipperdevices/faphub/screenshotspreview/impl/composable/content/ComposableScreenshotsPager.kt b/components/faphub/screenshotspreview/impl/src/main/kotlin/com/flipperdevices/faphub/screenshotspreview/impl/composable/content/ComposableScreenshotsPager.kt index 8d294c4329..3ff457e54c 100644 --- a/components/faphub/screenshotspreview/impl/src/main/kotlin/com/flipperdevices/faphub/screenshotspreview/impl/composable/content/ComposableScreenshotsPager.kt +++ b/components/faphub/screenshotspreview/impl/src/main/kotlin/com/flipperdevices/faphub/screenshotspreview/impl/composable/content/ComposableScreenshotsPager.kt @@ -48,7 +48,7 @@ internal fun ComposableScreenshotsPager( .onEach { event -> when (event) { is ImageSelectViewModel.Event.ImageSelected -> { - zoomState.reset().join() + zoomState.reset() pagerState.scrollToPage(event.index) } } diff --git a/components/filemngr/editor/impl/build.gradle.kts b/components/filemngr/editor/impl/build.gradle.kts index 3184f26d53..621846b119 100644 --- a/components/filemngr/editor/impl/build.gradle.kts +++ b/components/filemngr/editor/impl/build.gradle.kts @@ -53,5 +53,4 @@ commonDependencies { commonTestDependencies { // Testing implementation(libs.junit) - implementation(libs.ktx.testing) } diff --git a/components/filemngr/listing/impl/build.gradle.kts b/components/filemngr/listing/impl/build.gradle.kts index b9e2b23c71..f390db8c05 100644 --- a/components/filemngr/listing/impl/build.gradle.kts +++ b/components/filemngr/listing/impl/build.gradle.kts @@ -61,5 +61,4 @@ commonDependencies { commonTestDependencies { implementation(projects.components.core.test) implementation(libs.junit) - implementation(libs.ktx.testing) } diff --git a/components/filemngr/search/impl/src/commonMain/kotlin/com/flipperdevices/filemanager/search/impl/viewmodel/SearchViewModel.kt b/components/filemngr/search/impl/src/commonMain/kotlin/com/flipperdevices/filemanager/search/impl/viewmodel/SearchViewModel.kt index 0671cb317d..f33a478f20 100644 --- a/components/filemngr/search/impl/src/commonMain/kotlin/com/flipperdevices/filemanager/search/impl/viewmodel/SearchViewModel.kt +++ b/components/filemngr/search/impl/src/commonMain/kotlin/com/flipperdevices/filemanager/search/impl/viewmodel/SearchViewModel.kt @@ -36,7 +36,10 @@ import kotlinx.coroutines.job import kotlinx.coroutines.launch import kotlinx.coroutines.sync.Mutex import okio.Path -import kotlin.time.Duration.Companion.milliseconds +import kotlin.time.DurationUnit +import kotlin.time.toDuration + +private val DEBOUNCE_TIME = 1.toDuration(DurationUnit.SECONDS) class SearchViewModel @AssistedInject constructor( featureProvider: FFeatureProvider, @@ -130,7 +133,7 @@ class SearchViewModel @AssistedInject constructor( init { combine( flow = featureState, - flow2 = _searchState.debounceAfterFirst(timeout = 1000.milliseconds), + flow2 = _searchState.debounceAfterFirst(DEBOUNCE_TIME), transform = { featureState, _ -> when (featureState) { FFeatureStatus.NotFound -> _state.emit(State.Unsupported) diff --git a/components/filemngr/upload/impl/build.gradle.kts b/components/filemngr/upload/impl/build.gradle.kts index dff8725c48..0d51f80d8d 100644 --- a/components/filemngr/upload/impl/build.gradle.kts +++ b/components/filemngr/upload/impl/build.gradle.kts @@ -60,5 +60,4 @@ commonDependencies { commonTestDependencies { implementation(projects.components.core.test) implementation(libs.junit) - implementation(libs.ktx.testing) } diff --git a/components/firstpair/impl/src/main/java/com/flipperdevices/firstpair/impl/viewmodels/connecting/PairDeviceViewModel.kt b/components/firstpair/impl/src/main/java/com/flipperdevices/firstpair/impl/viewmodels/connecting/PairDeviceViewModel.kt index e44eb38692..e516c19345 100644 --- a/components/firstpair/impl/src/main/java/com/flipperdevices/firstpair/impl/viewmodels/connecting/PairDeviceViewModel.kt +++ b/components/firstpair/impl/src/main/java/com/flipperdevices/firstpair/impl/viewmodels/connecting/PairDeviceViewModel.kt @@ -29,9 +29,10 @@ import kotlinx.coroutines.plus import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.withTimeout import javax.inject.Inject -import kotlin.time.Duration.Companion.seconds +import kotlin.time.DurationUnit +import kotlin.time.toDuration -private val TIMEOUT = 10.seconds +private val TIMEOUT = 10.toDuration(DurationUnit.SECONDS) class PairDeviceViewModel( private val firstPairBleManagerFactory: FirstPairBleManager.Factory, diff --git a/components/inappnotification/impl/src/main/java/com/flipperdevices/inappnotification/impl/storage/InAppNotificationStorageImpl.kt b/components/inappnotification/impl/src/main/java/com/flipperdevices/inappnotification/impl/storage/InAppNotificationStorageImpl.kt index 28c459b40f..c2c06a3bf3 100644 --- a/components/inappnotification/impl/src/main/java/com/flipperdevices/inappnotification/impl/storage/InAppNotificationStorageImpl.kt +++ b/components/inappnotification/impl/src/main/java/com/flipperdevices/inappnotification/impl/storage/InAppNotificationStorageImpl.kt @@ -13,9 +13,10 @@ import kotlinx.coroutines.SupervisorJob import java.util.Stack import javax.inject.Inject import javax.inject.Singleton -import kotlin.time.Duration.Companion.seconds +import kotlin.time.DurationUnit +import kotlin.time.toDuration -private val TIMER_DELAY = 1.seconds +private val TIMER_DELAY = 1.toDuration(DurationUnit.SECONDS) @Singleton @ContributesBinding(AppGraph::class, InAppNotificationStorage::class) diff --git a/components/remote-controls/grid/remote/impl/src/main/kotlin/com/flipperdevices/remotecontrols/impl/grid/remote/composable/components/RemoteGridComposableContent.kt b/components/remote-controls/grid/remote/impl/src/main/kotlin/com/flipperdevices/remotecontrols/impl/grid/remote/composable/components/RemoteGridComposableContent.kt index cd68b7f920..1427abbb11 100644 --- a/components/remote-controls/grid/remote/impl/src/main/kotlin/com/flipperdevices/remotecontrols/impl/grid/remote/composable/components/RemoteGridComposableContent.kt +++ b/components/remote-controls/grid/remote/impl/src/main/kotlin/com/flipperdevices/remotecontrols/impl/grid/remote/composable/components/RemoteGridComposableContent.kt @@ -27,7 +27,7 @@ internal fun RemoteGridComposableContent( targetState = model, modifier = modifier, transitionSpec = { fadeIn().togetherWith(fadeOut()) }, - contentKey = { model.contentKey } + contentKey = { it.contentKey } ) { animatedModel -> when (animatedModel) { is RemoteGridComponent.Model.Error -> { diff --git a/components/remote-controls/grid/saved/impl/src/main/kotlin/com/flipperdevices/remotecontrols/impl/grid/local/composable/components/LocalGridComposableContent.kt b/components/remote-controls/grid/saved/impl/src/main/kotlin/com/flipperdevices/remotecontrols/impl/grid/local/composable/components/LocalGridComposableContent.kt index 76cefc619b..9998f16648 100644 --- a/components/remote-controls/grid/saved/impl/src/main/kotlin/com/flipperdevices/remotecontrols/impl/grid/local/composable/components/LocalGridComposableContent.kt +++ b/components/remote-controls/grid/saved/impl/src/main/kotlin/com/flipperdevices/remotecontrols/impl/grid/local/composable/components/LocalGridComposableContent.kt @@ -37,7 +37,7 @@ internal fun LocalGridComposableContent( targetState = model, modifier = modifier, transitionSpec = { fadeIn().togetherWith(fadeOut()) }, - contentKey = { model.contentKey } + contentKey = { it.contentKey } ) { animatedModel -> when (animatedModel) { // We leave screen on error diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0f59a402bc..6795c7808c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,106 +1,102 @@ [versions] # You also need to bump the version of ksp -kotlin-general = "2.1.0" # https://kotlinlang.org/docs/releases.html#release-details -kotlin-immutable-collections = "0.3.8" # https://github.com/Kotlin/kotlinx.collections.immutable/releases -kotlin-datetime = "0.6.1" # https://github.com/Kotlin/kotlinx-datetime/releases -kotlinx = "1.10.1" # https://github.com/Kotlin/kotlinx.coroutines/releases -ksp = "2.1.0-1.0.29" # https://github.com/google/ksp/releases -anvil = "0.4.0" # https://github.com/ZacSweers/anvil/releases -anvil-utils = "0.3.0-beta02" # https://github.com/IlyaGulya/anvil-utils/releases -android-gradle = "8.7.3" # https://developer.android.com/studio/releases/gradle-plugin -protobuf = "4.29.1" # https://github.com/protocolbuffers/protobuf/releases -protobuf-gradle = "0.9.4" # https://github.com/google/protobuf-gradle-plugin/releases -compose-material = "1.7.6" # https://developer.android.com/jetpack/androidx/releases/compose#versions -compose-material3 = "1.3.1" # https://developer.android.com/jetpack/androidx/releases/compose#versions -compose-foundation = "1.7.6" # https://developer.android.com/jetpack/androidx/releases/compose#versions -compose-ui = "1.7.6" # https://developer.android.com/jetpack/androidx/releases/compose#versions -compose-wear = "1.4.0" # https://developer.android.com/jetpack/androidx/releases/wear-compose +kotlin-general = "2.2.0" # https://kotlinlang.org/docs/releases.html#release-details +kotlin-immutable-collections = "0.4.0" # https://github.com/Kotlin/kotlinx.collections.immutable/releases +kotlin-datetime = "0.7.0" # https://github.com/Kotlin/kotlinx-datetime/releases +kotlinx = "1.10.2" # https://github.com/Kotlin/kotlinx.coroutines/releases +ksp = "2.2.0-2.0.2" # https://github.com/google/ksp/releases +anvil = "0.4.1" # https://github.com/ZacSweers/anvil/releases +anvil-utils = "0.3.0-beta03" # https://github.com/IlyaGulya/anvil-utils/releases +android-gradle = "8.11.0" # https://developer.android.com/studio/releases/gradle-plugin +protobuf = "4.31.1" # https://github.com/protocolbuffers/protobuf/releases +protobuf-gradle = "0.9.5" # https://github.com/google/protobuf-gradle-plugin/releases +compose-material = "1.8.3" # https://developer.android.com/jetpack/androidx/releases/compose#versions +compose-material-icon = "1.7.8" # https://developer.android.com/jetpack/androidx/releases/compose#versions +compose-foundation = "1.8.3" # https://developer.android.com/jetpack/androidx/releases/compose#versions +compose-ui = "1.8.3" # https://developer.android.com/jetpack/androidx/releases/compose#versions +compose-wear = "1.4.1" # https://developer.android.com/jetpack/androidx/releases/wear-compose compose-wear-preview = "1.0.0" # https://mvnrepository.com/artifact/androidx.wear/wear-tooling-preview compose-accompanist = "0.36.0" # https://github.com/google/accompanist/releases compose-placeholder = "2.0.0" # https://github.com/fornewid/placeholder/releases -compose-constraint = "0.5.0" # https://github.com/Lavmee/constraintlayout-compose-multiplatform/releases -compose-paging = "3.3.5" # https://developer.android.com/jetpack/androidx/releases/paging +compose-constraint = "0.6.0" # https://github.com/Lavmee/constraintlayout-compose-multiplatform/releases +compose-paging = "3.3.6" # https://developer.android.com/jetpack/androidx/releases/paging compose-drag-drop = "0.9.6" # https://github.com/aclassen/ComposeReorderable/releases -compose-multiplatform = "1.7.1" # https://github.com/JetBrains/compose-multiplatform/releases -# 0.6.17 requires androidx.navigation:navigation-compose:2.8.0-beta0 -# androidx.navigation:navigation-compose:2.8.0-beta0 requires Android API 35 -# Android API 35 not supported by roboelectric -horologist = "0.6.17" # https://github.com/google/horologist/releases -# Until fix https://github.com/Kotlin/kotlinx.serialization/issues/2803 -serialization-json = "1.7.3" # https://github.com/Kotlin/kotlinx.serialization/releases +compose-multiplatform = "1.8.2" # https://github.com/JetBrains/compose-multiplatform/releases +horologist = "0.6.23" # https://github.com/google/horologist/releases +serialization-json = "1.9.0" # https://github.com/Kotlin/kotlinx.serialization/releases wear = "1.3.0" # https://developer.android.com/jetpack/androidx/releases/wear wear-gms = "19.0.0" # https://mvnrepository.com/artifact/com.google.android.gms/play-services-wearable?repo=google -wear-interaction-phone = "1.1.0-alpha05" # https://developer.android.com/jetpack/androidx/releases/wear +wear-interaction-phone = "1.1.0" # https://developer.android.com/jetpack/androidx/releases/wear wear-interaction-remote = "1.1.0" # https://developer.android.com/jetpack/androidx/releases/wear -room = "2.6.1" # https://developer.android.com/jetpack/androidx/releases/room -dagger = "2.53.1" # https://github.com/google/dagger/releases +room = "2.7.2" # https://developer.android.com/jetpack/androidx/releases/room +dagger = "2.56.2" # https://github.com/google/dagger/releases timber = "5.0.1" # https://github.com/JakeWharton/timber/releases timber-treessence = "1.1.2" # https://github.com/bastienpaulfr/Treessence/tags -sentry-runtime = "7.19.0" # https://github.com/getsentry/sentry-java/releases -sentry-gradle = "4.14.1" # https://github.com/getsentry/sentry-android-gradle-plugin/releases +sentry-runtime = "8.16.0" # https://github.com/getsentry/sentry-java/releases +sentry-gradle = "5.8.0" # https://github.com/getsentry/sentry-android-gradle-plugin/releases zip4j = "2.11.5" # https://github.com/srikanth-lingala/zip4j/releases -ktx = "1.15.0" # https://developer.android.com/jetpack/androidx/releases/core -ktx-activity = "1.9.3" # https://developer.android.com/jetpack/androidx/releases/activity +ktx = "1.16.0" # https://developer.android.com/jetpack/androidx/releases/core +ktx-activity = "1.10.1" # https://developer.android.com/jetpack/androidx/releases/activity ktx-testing = "1.2.1" # https://developer.android.com/jetpack/androidx/releases/test -lifecycle = "2.8.7" # https://developer.android.com/jetpack/androidx/releases/lifecycle -fastutil = "8.5.15" # https://github.com/vigna/fastutil/tags -ble = "2.9.0" # https://github.com/NordicSemiconductor/Android-BLE-Library/releases +lifecycle = "2.9.1" # https://developer.android.com/jetpack/androidx/releases/lifecycle +fastutil = "8.5.16" # https://github.com/vigna/fastutil/tags +ble = "2.10.1" # https://github.com/NordicSemiconductor/Android-BLE-Library/releases ble-scan = "1.6.0" # https://github.com/NordicSemiconductor/Android-Scanner-Compat-Library/releases -ble-kotlin = "1.3.0" # https://github.com/NordicSemiconductor/Kotlin-BLE-Library/releases +ble-kotlin = "1.3.1" # https://github.com/NordicSemiconductor/Kotlin-BLE-Library/releases # don't update to 2.x, unless the ble-kotlin is also updated. PR: https://github.com/arcao/slf4j-timber/pull/12 slf4j = "1.7.36" # https://github.com/qos-ch/slf4j/tags slf4j-timber = "3.1" # https://github.com/arcao/slf4j-timber -lottie = "6.6.1" # https://github.com/airbnb/lottie/blob/master/android-compose.md +lottie = "6.6.7" # https://github.com/airbnb/lottie/blob/master/android-compose.md material = "1.12.0" # https://github.com/material-components/material-components-android/releases splashscreen = "1.1.0-rc01" # https://developer.android.com/jetpack/androidx/releases/core annotations = "1.9.1" # https://developer.android.com/jetpack/androidx/releases/annotation -appcompat = "1.7.0" # https://developer.android.com/jetpack/androidx/releases/appcompat -androidx-core = "1.15.0" # https://developer.android.com/jetpack/androidx/releases/core -datastore = "1.1.1" # https://developer.android.com/topic/libraries/architecture/datastore +appcompat = "1.7.1" # https://developer.android.com/jetpack/androidx/releases/appcompat +androidx-core = "1.16.0" # https://developer.android.com/jetpack/androidx/releases/core +datastore = "1.1.7" # https://developer.android.com/topic/libraries/architecture/datastore # https://github.com/vsch/flexmark-java/issues/442 flexmark = "0.42.14" # https://github.com/vsch/flexmark-java/tags -markdown = "0.27.0" # https://github.com/mikepenz/multiplatform-markdown-renderer/releases -ktor = "3.0.3" # https://ktor.io/ +markdown = "0.35.0" # https://github.com/mikepenz/multiplatform-markdown-renderer/releases +ktor = "3.1.2" # https://ktor.io/ apache-compress = "1.27.1" # https://commons.apache.org/proper/commons-compress/ -apache-codec = "1.17.1" # https://mvnrepository.com/artifact/commons-codec/commons-codec -countly = "24.7.7" # https://github.com/Countly/countly-sdk-android/releases +apache-codec = "1.18.0" # https://mvnrepository.com/artifact/commons-codec/commons-codec +countly = "25.4.2" # https://github.com/Countly/countly-sdk-android/releases grgit-gradle = "8d818b74b9" -work = "2.10.0" # https://developer.android.com/jetpack/androidx/releases/work -coil = "3.0.4" # https://github.com/coil-kt/coil/releases +work = "2.10.2" # https://developer.android.com/jetpack/androidx/releases/work +coil = "3.2.0" # https://github.com/coil-kt/coil/releases play-core = "2.1.0" # https://developer.android.com/guide/playcore#java-kotlin-in-app-update -decompose = "3.2.2" # https://github.com/arkivanov/Decompose/releases -essenty = "2.4.0" # https://github.com/arkivanov/Essenty/releases -zoomable = "1.6.2" #https://github.com/usuiat/Zoomable +decompose = "3.3.0" # https://github.com/arkivanov/Decompose/releases +essenty = "2.5.0" # https://github.com/arkivanov/Essenty/releases +zoomable = "2.8.1" #https://github.com/usuiat/Zoomable # Testing junit = "4.13.2" # https://github.com/junit-team/junit4/releases mockito = "5.4.0" # https://github.com/mockito/mockito/releases -roboelectric = "4.14.1" # https://github.com/robolectric/robolectric/releases -mockk = "1.13.13" # https://mockk.io/ +roboelectric = "4.15.1" # https://github.com/robolectric/robolectric/releases +mockk = "1.14.4" # https://mockk.io/ # Testing UI espresso-core = "3.6.1" # https://github.com/android/android-test uiautomator = "2.3.0" # https://developer.android.com/training/testing/other-components/ui-automator#set-ui -benchmark-macro-junit4 = "1.3.3" # https://developer.android.com/jetpack/androidx/releases/benchmark -baselineprofile = "1.3.3" # https://developer.android.com/topic/performance/baselineprofiles/overview#recommended-versions +benchmark-macro-junit4 = "1.3.4" # https://developer.android.com/jetpack/androidx/releases/benchmark +baselineprofile = "1.3.4" # https://developer.android.com/topic/performance/baselineprofiles/overview#recommended-versions profileinstaller = "1.4.1" # https://developer.android.com/topic/performance/baselineprofiles/overview#recommended-versions # Linters -detekt = "1.23.7" # https://detekt.dev/docs/gettingstarted/gradle/ +detekt = "1.23.8" # https://detekt.dev/docs/gettingstarted/gradle/ detekt-ruleset-compiler = "0.0.4" # https://github.com/BraisGabin/detekt-compiler-rules/releases detekt-ruleset-ktlint = "0.50.0" # https://github.com/pinterest/ktlint/releases detekt-ruleset-compose = "0.4.22" # https://github.com/mrmans0n/compose-rules/releases detekt-ruleset-decompose = "1.0.1" # https://github.com/LionZXY/detekt-decompose-rule/releases # Firebase -google-gms-gradle = "4.4.2" # https://developers.google.com/android/guides/google-services-plugin -google-gms-firebase = "24.1.0" # https://firebase.google.com/docs/android/setup#kotlin:~:text=com.google.firebase%3Afirebase%2Dmessaging +google-gms-gradle = "4.4.3" # https://developers.google.com/android/guides/google-services-plugin +google-gms-firebase = "24.1.2" # https://firebase.google.com/docs/android/setup#kotlin:~:text=com.google.firebase%3Afirebase%2Dmessaging # Build Config -buildkonfig = "5.5.1" +buildkonfig = "5.6.7" -wire = "5.1.0" -okio = "3.9.1" -jserial = "2.11.0" +wire = "5.3.3" +okio = "3.14.0" +jserial = "2.11.2" [libraries] @@ -147,9 +143,8 @@ compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose-ui" } compose-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose-ui" } compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose-foundation" } compose-material = { module = "androidx.compose.material:material", version.ref = "compose-material" } -compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" } -compose-material-icons-core = { module = "androidx.compose.material:material-icons-core", version.ref = "compose-material" } -compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose-material" } +compose-material-icons-core = { module = "androidx.compose.material:material-icons-core", version.ref = "compose-material-icon" } +compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose-material-icon" } # UI - Wear compose-wear-material = { module = "androidx.wear.compose:compose-material", version.ref = "compose-wear" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c1d5e01859..be2dc79a8a 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.11.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/instances/android/baselineprofile/build.gradle.kts b/instances/android/baselineprofile/build.gradle.kts index a82824a925..ba38285ceb 100644 --- a/instances/android/baselineprofile/build.gradle.kts +++ b/instances/android/baselineprofile/build.gradle.kts @@ -19,7 +19,7 @@ android { buildConfigField("String", "TARGET_APP_ID_KEY", "\"${TARGET_APP_ID_KEY}\"") } - targetProjectPath = projects.instances.android.app.identityPath.path + targetProjectPath = projects.instances.android.app.path testOptions.managedDevices.devices { create("pixel6Api31") {