diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 63fa6423..4c0bf0a6 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -11,6 +11,18 @@ -keepattributes SourceFile,LineNumberTable -keep public class * extends java.lang.Exception +# --- Retrofit + kotlin.Result --- +# kotlin.Result는 inline class라 R8이 제네릭 타입 정보를 최적화함 +# Retrofit이 Call>의 타입 파라미터를 리플렉션으로 읽지 못해 CallAdapter 생성 실패 +# https://github.com/square/retrofit/issues/3880 +-keep class kotlin.Result { *; } +-keepattributes Signature + +# --- DTO --- +# Gson 리플렉션으로 역직렬화되는 DTO 클래스의 필드명 보존 +# (BaseResponse, ErrorResponse 등이 ResponseInterceptor에서 Gson으로 파싱됨) +-keepclassmembers class com.runnect.runnect.data.dto.response.base.** { ; } + # --- Kakao SDK --- # 공식 문서: https://developers.kakao.com/docs/latest/en/android/getting-started#configure-for-shrinking-and-obfuscation-(optional) -keep class com.kakao.sdk.**.model.* { ; }