From fc519c7ddfa351384e52bf06b462c35f13d0a66c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 4 Sep 2026 14:04:54 +0200 Subject: [PATCH] Remove obsolete Retrofit keep rules from the network module The three rules came from a 2022 comment on Retrofit issue #3751. Retrofit 3.0.0 now ships META-INF/proguard/retrofit2.pro, which contains two of them verbatim and covers retrofit2.Call through its conditional return-type rule. Co-Authored-By: Claude Opus 5 (1M context) --- libraries/network/build.gradle.kts | 6 ------ libraries/network/consumer-rules.pro | 9 --------- 2 files changed, 15 deletions(-) delete mode 100644 libraries/network/consumer-rules.pro diff --git a/libraries/network/build.gradle.kts b/libraries/network/build.gradle.kts index 20f75091d9..faabe91a1c 100644 --- a/libraries/network/build.gradle.kts +++ b/libraries/network/build.gradle.kts @@ -13,12 +13,6 @@ plugins { android { namespace = "io.element.android.libraries.network" - - buildTypes { - release { - consumerProguardFiles("consumer-rules.pro") - } - } } setupDependencyInjection() diff --git a/libraries/network/consumer-rules.pro b/libraries/network/consumer-rules.pro deleted file mode 100644 index 1026dca840..0000000000 --- a/libraries/network/consumer-rules.pro +++ /dev/null @@ -1,9 +0,0 @@ -# From https://github.com/square/retrofit/issues/3751#issuecomment-1192043644 -# Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items). --keep,allowobfuscation,allowshrinking interface retrofit2.Call --keep,allowobfuscation,allowshrinking class retrofit2.Response - -# 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