Conversation
1. kotlin.Result 제네릭 타입 정보 보존 (-keep class kotlin.Result)
- R8이 inline class인 kotlin.Result의 Signature를 최적화하면서
Retrofit의 ResultCallAdapterFactory가 Call<Result<T>> 타입을 인식 못함
- square/retrofit#3880
2. BaseResponse/ErrorResponse DTO 필드명 보존 (-keepclassmembers)
- ResponseInterceptor에서 Gson으로 역직렬화 시 필드명 매핑 실패 방지
- 범위를 data.dto.response.base 패키지로 한정
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughProGuard/R8 keep rules were added to preserve runtime type information for Retrofit's Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
kotlin.Result 규칙을 #381에 합쳐서 하나의 PR로 진행 |
작업 배경
R8 난독화(#379) 적용 후 릴리즈 빌드에서 모든 API 호출이 실패하는 버그 발생. 디버그 빌드에서는 정상 동작.
원인 분석
1. kotlin.Result 제네릭 타입 소실
kotlin.Result는 inline(value) class → R8이 제네릭 Signature 속성을 최적화Call<Result<T>>의 타입 파라미터를 리플렉션으로 읽지 못함ResultCallAdapterFactory에서IllegalArgumentException: Unable to create call adapter발생2. BaseResponse DTO 필드명 난독화
ResponseInterceptor에서 Gson으로BaseResponse를 역직렬화BaseResponse는@SerialName(Kotlin Serialization)만 선언,@SerializedName(Gson) 없음변경 사항 (
app/proguard-rules.pro)영향 범위
Test Plan
🤖 Generated with Claude Code
Summary by CodeRabbit