mirror of
https://github.com/bitwarden/android.git
synced 2026-03-11 20:54:58 -05:00
Update Kotlin and associated dependencies (#6408)
This commit is contained in:
@@ -149,7 +149,6 @@ import io.mockk.unmockkStatic
|
|||||||
import io.mockk.verify
|
import io.mockk.verify
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.test.runTest
|
import kotlinx.coroutines.test.runTest
|
||||||
import kotlinx.serialization.ExperimentalSerializationApi
|
|
||||||
import kotlinx.serialization.json.JsonNull
|
import kotlinx.serialization.json.JsonNull
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
import kotlinx.serialization.json.JsonPrimitive
|
import kotlinx.serialization.json.JsonPrimitive
|
||||||
@@ -389,7 +388,6 @@ class AuthRepositoryTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@OptIn(ExperimentalSerializationApi::class)
|
|
||||||
@Suppress("MaxLineLength")
|
@Suppress("MaxLineLength")
|
||||||
fun `loading the policies should emit masterPasswordPolicyFlow if the password fails any checks`() =
|
fun `loading the policies should emit masterPasswordPolicyFlow if the password fails any checks`() =
|
||||||
runTest {
|
runTest {
|
||||||
|
|||||||
@@ -36,15 +36,14 @@ abstract class ExportParser {
|
|||||||
* @param byteArray The input data to be parsed as a [ByteArray].
|
* @param byteArray The input data to be parsed as a [ByteArray].
|
||||||
* @return [ExportParseResult] indicating success or a specific error result.
|
* @return [ExportParseResult] indicating success or a specific error result.
|
||||||
*/
|
*/
|
||||||
@OptIn(ExperimentalSerializationApi::class)
|
|
||||||
fun parseForResult(byteArray: ByteArray): ExportParseResult = try {
|
fun parseForResult(byteArray: ByteArray): ExportParseResult = try {
|
||||||
parse(byteArray = byteArray)
|
parse(byteArray = byteArray)
|
||||||
} catch (error: MissingFieldException) {
|
} catch (@OptIn(ExperimentalSerializationApi::class) _: MissingFieldException) {
|
||||||
ExportParseResult.Error(
|
ExportParseResult.Error(
|
||||||
title = BitwardenString.required_information_missing.asText(),
|
title = BitwardenString.required_information_missing.asText(),
|
||||||
message = BitwardenString.required_information_missing_message.asText(),
|
message = BitwardenString.required_information_missing_message.asText(),
|
||||||
)
|
)
|
||||||
} catch (error: SerializationException) {
|
} catch (_: SerializationException) {
|
||||||
ExportParseResult.Error(
|
ExportParseResult.Error(
|
||||||
title = BitwardenString.file_could_not_be_processed.asText(),
|
title = BitwardenString.file_could_not_be_processed.asText(),
|
||||||
message = BitwardenString.file_could_not_be_processed_message.asText(),
|
message = BitwardenString.file_could_not_be_processed_message.asText(),
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import dagger.Module
|
|||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
import dagger.hilt.InstallIn
|
import dagger.hilt.InstallIn
|
||||||
import dagger.hilt.components.SingletonComponent
|
import dagger.hilt.components.SingletonComponent
|
||||||
import kotlinx.serialization.ExperimentalSerializationApi
|
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.modules.SerializersModule
|
import kotlinx.serialization.modules.SerializersModule
|
||||||
import kotlinx.serialization.modules.contextual
|
import kotlinx.serialization.modules.contextual
|
||||||
@@ -38,7 +37,6 @@ object CoreModule {
|
|||||||
coerceInputValues = true
|
coerceInputValues = true
|
||||||
|
|
||||||
// Allow trailing commas in JSON objects and arrays.
|
// Allow trailing commas in JSON objects and arrays.
|
||||||
@OptIn(ExperimentalSerializationApi::class)
|
|
||||||
allowTrailingComma = true
|
allowTrailingComma = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,15 +40,15 @@ googleProtoBufJava = "4.33.4"
|
|||||||
googleProtoBufPlugin = "0.9.6"
|
googleProtoBufPlugin = "0.9.6"
|
||||||
googleServices = "4.4.4"
|
googleServices = "4.4.4"
|
||||||
googleReview = "2.0.2"
|
googleReview = "2.0.2"
|
||||||
hilt = "2.57.2"
|
hilt = "2.58"
|
||||||
junit = "6.0.2"
|
junit = "6.0.2"
|
||||||
jvmTarget = "21"
|
jvmTarget = "21"
|
||||||
kotlin = "2.2.21"
|
kotlin = "2.3.0"
|
||||||
kotlinxCollectionsImmutable = "0.4.0"
|
kotlinxCollectionsImmutable = "0.4.0"
|
||||||
kotlinxCoroutines = "1.10.2"
|
kotlinxCoroutines = "1.10.2"
|
||||||
kotlinxSerialization = "1.9.0"
|
kotlinxSerialization = "1.10.0"
|
||||||
kotlinxKover = "0.9.4"
|
kotlinxKover = "0.9.4"
|
||||||
ksp = "2.3.3"
|
ksp = "2.3.4"
|
||||||
mockk = "1.14.7"
|
mockk = "1.14.7"
|
||||||
okhttp = "5.3.2"
|
okhttp = "5.3.2"
|
||||||
retrofitBom = "3.0.0"
|
retrofitBom = "3.0.0"
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import android.os.Parcelable
|
|||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import androidx.core.os.ParcelCompat
|
import androidx.core.os.ParcelCompat
|
||||||
import com.bitwarden.annotation.OmitFromCoverage
|
import com.bitwarden.annotation.OmitFromCoverage
|
||||||
import kotlinx.serialization.ExperimentalSerializationApi
|
|
||||||
import kotlinx.serialization.InternalSerializationApi
|
|
||||||
import kotlinx.serialization.KSerializer
|
import kotlinx.serialization.KSerializer
|
||||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||||
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
|
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
|
||||||
@@ -85,7 +83,6 @@ import kotlin.reflect.KClass
|
|||||||
* The latter is useful in cases where the same `ViewModel` is used to handle these routes.
|
* The latter is useful in cases where the same `ViewModel` is used to handle these routes.
|
||||||
*/
|
*/
|
||||||
@OmitFromCoverage
|
@OmitFromCoverage
|
||||||
@OptIn(InternalSerializationApi::class, ExperimentalSerializationApi::class)
|
|
||||||
open class ParcelableRouteSerializer<T : Parcelable>(
|
open class ParcelableRouteSerializer<T : Parcelable>(
|
||||||
private val kClass: KClass<T>,
|
private val kClass: KClass<T>,
|
||||||
) : KSerializer<T> {
|
) : KSerializer<T> {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import kotlin.reflect.KClass
|
|||||||
/**
|
/**
|
||||||
* Gets the route string for an object.
|
* Gets the route string for an object.
|
||||||
*/
|
*/
|
||||||
@OptIn(InternalSerializationApi::class)
|
|
||||||
fun <T : Any> T.toObjectNavigationRoute(): String = this::class.toObjectKClassNavigationRoute()
|
fun <T : Any> T.toObjectNavigationRoute(): String = this::class.toObjectKClassNavigationRoute()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user