Skip to content

Commit 424db4c

Browse files
committed
fix: kotlin.Result 제네릭 타입 정보 보존으로 Retrofit CallAdapter 생성 실패 해결
R8이 inline class인 kotlin.Result의 제네릭 Signature를 최적화하면서 Retrofit이 Call<Result<T>>의 타입 파라미터를 읽지 못해 ResultCallAdapterFactory에서 IllegalArgumentException 발생. -keep class kotlin.Result + -keepattributes Signature 추가. square/retrofit#3880
1 parent 76a715f commit 424db4c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

app/proguard-rules.pro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616
# (BaseResponse, ErrorResponse 등이 Gson과 Kotlin Serialization 양쪽에서 사용됨)
1717
-keepclassmembers class com.runnect.runnect.data.dto.** { <fields>; }
1818

19+
# --- Retrofit + kotlin.Result ---
20+
# Retrofit이 리턴 타입의 제네릭 정보를 리플렉션으로 읽으므로 Signature 유지 필요
21+
# kotlin.Result는 inline class라 R8이 타입 정보를 최적화할 수 있음
22+
# https://github.com/square/retrofit/issues/3880
23+
-keep class kotlin.Result { *; }
24+
-keepattributes Signature
25+
1926
# --- Kakao SDK ---
2027
# 공식 문서: https://developers.kakao.com/docs/latest/en/android/getting-started#configure-for-shrinking-and-obfuscation-(optional)
2128
-keep class com.kakao.sdk.**.model.* { <fields>; }

0 commit comments

Comments
 (0)