diff --git a/android/proguard-rules.pro b/android/proguard-rules.pro index d7045666..a0cd8454 100644 --- a/android/proguard-rules.pro +++ b/android/proguard-rules.pro @@ -1,22 +1,2 @@ -dontobfuscate -keepattributes SourceFile, LineNumberTable - -# From https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro - -# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy -# and replaces all potential values with null. Explicitly keeping the interfaces prevents this. --if interface * { @retrofit2.http.* ; } --keep,allowobfuscation interface <1> - -# Keep inherited services. --if interface * { @retrofit2.http.* ; } --keep,allowobfuscation interface * extends <1> - -# With R8 full mode generic signatures are stripped for classes that are not -# kept. Suspend functions are wrapped in continuations where the type argument -# is used. --keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation - -# R8 full mode strips generic signatures from return types if not kept. --if interface * { @retrofit2.http.* public *** *(...); } --keep,allowoptimization,allowshrinking,allowobfuscation class <3> diff --git a/core/src/main/kotlin/dev/msfjarvis/claw/core/injection/JsonModule.kt b/core/src/main/kotlin/dev/msfjarvis/claw/core/injection/JsonModule.kt index 8910fb48..d9601109 100644 --- a/core/src/main/kotlin/dev/msfjarvis/claw/core/injection/JsonModule.kt +++ b/core/src/main/kotlin/dev/msfjarvis/claw/core/injection/JsonModule.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2021-2023 Harsh Shandilya. + * Copyright © 2021-2024 Harsh Shandilya. * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. @@ -7,7 +7,6 @@ package dev.msfjarvis.claw.core.injection import com.deliveryhero.whetstone.app.ApplicationScope -import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory import com.squareup.anvil.annotations.ContributesTo import dagger.Module import dagger.Provides @@ -18,6 +17,7 @@ import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonNamingStrategy import okhttp3.MediaType.Companion.toMediaType import retrofit2.Converter +import retrofit2.converter.kotlinx.serialization.asConverterFactory @Module @ContributesTo(ApplicationScope::class) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bbf700f9..6171ee9b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ konvert = "3.0.1" kotlin = "1.9.23" kotlinResult = "2.0.0" lifecycle = "2.7.0" -retrofit = "2.9.0" +retrofit = "2.10.0" richtext = "1.0.0-alpha01" sentry-sdk = "7.6.0" serialization = "1.6.3" @@ -92,7 +92,7 @@ okhttp-core = { module = "com.squareup.okhttp3:okhttp" } okhttp-loggingInterceptor = { module = "com.squareup.okhttp3:logging-interceptor" } okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver" } retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } -retrofit-kotlinxSerializationConverter = "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:1.0.0" +retrofit-kotlinxSerializationConverter = { module = "com.squareup.retrofit2:converter-kotlinx-serialization", version.ref = "retrofit" } sentry-android = { module = "io.sentry:sentry-android", version.ref = "sentry-sdk" } sentry-bom = { module = "io.sentry:sentry-bom", version.ref = "sentry-sdk" } sentry-okhttp = { module = "io.sentry:sentry-okhttp", version.ref = "sentry-sdk" }