From df0c7233c1a71051f7b70704b2dcfa5ca3c414f1 Mon Sep 17 00:00:00 2001 From: oungsi2000 Date: Thu, 20 Aug 2026 00:48:51 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]:=20=EC=98=A8=EB=B3=B4=EB=94=A9=20?= =?UTF-8?q?=EC=A2=85=EB=A3=8C=20=EB=A1=9C=EC=A7=81=20=EB=B3=B4=EC=99=84=20?= =?UTF-8?q?=EB=B0=8F=20Retrofit=20ProGuard=20=EA=B7=9C=EC=B9=99=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 온보딩 과정에서 권한 요청 이후 화면 전환이 누락된 문제를 수정하고, 향후 코드 난독화 적용에 대비하여 Retrofit 관련 ProGuard 예외 규칙을 구성합니다. - `OnboardingRoute`: 권한 요청 결과 수신(`permissionLauncher`) 시 `onFinish()`를 호출하여 다음 단계로 진입하도록 로직 수정 - `OnboardingRoute`: Android 13(Tiramisu) 미만 버전에서 알림 권한 요청 사이드 이펙트 발생 시 즉시 `onFinish()`가 호출되도록 예외 처리 추가 - `app/build.gradle.kts`: 릴리스 설정에서 `isMinifyEnabled` 및 `isShrinkResources`를 `false`로 변경 - `proguard-rules.pro`: Retrofit 인터페이스, `@retrofit2.http` 어노테이션이 붙은 메서드, suspend 함수 반환 타입 및 제네릭 타입(`Response`, `Call`, `Continuation`) 유지를 위한 규칙 추가 --- app/build.gradle.kts | 3 +- app/proguard-rules.pro | 34 ++++++++++++++++++- .../com/kikidan/onboarding/OnboardingRoute.kt | 3 ++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8c8cc2c7..8f6e4d24 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -45,8 +45,7 @@ android { manifestPlaceholders["KAKAO_APP_KEY"] = kakaoKey manifestPlaceholders["APP_LINK_HOST"] = appLinkHost - isMinifyEnabled = true - isShrinkResources = true + isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb434..1e97e068 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -18,4 +18,36 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +# Retrofit +-keepattributes Signature, InnerClasses, EnclosingMethod +-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations +-keepattributes AnnotationDefault + +-keepclassmembers,allowshrinking,allowobfuscation interface * { + @retrofit2.http.* ; +} + +-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement +-dontwarn javax.annotation.** +-dontwarn kotlin.Unit +-dontwarn retrofit2.KotlinExtensions +-dontwarn retrofit2.KotlinExtensions$* + +# suspend 함수 반환 타입 유지 +-if interface * { @retrofit2.http.* ; } +-keep,allowobfuscation interface <1> + +-if interface * { @retrofit2.http.* ; } +-keep,allowobfuscation interface * extends <1> + +# Retrofit이 사용하는 제네릭 타입 +-keep,allowobfuscation,allowshrinking class retrofit2.Response +-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation +-keep,allowobfuscation,allowshrinking interface retrofit2.Call +-keep,allowobfuscation,allowshrinking class retrofit2.Response +-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation + +-if interface * { @retrofit2.http.* ; } +-keep,allowobfuscation interface <1> \ No newline at end of file diff --git a/feature/onboarding/src/main/java/com/kikidan/onboarding/OnboardingRoute.kt b/feature/onboarding/src/main/java/com/kikidan/onboarding/OnboardingRoute.kt index ca622582..86c8df94 100644 --- a/feature/onboarding/src/main/java/com/kikidan/onboarding/OnboardingRoute.kt +++ b/feature/onboarding/src/main/java/com/kikidan/onboarding/OnboardingRoute.kt @@ -47,6 +47,7 @@ fun OnboardingRoute( ) { // 권한을 허락하지 않더라도 앱 진입 permissionHandled = true + onFinish() } viewModel.collectSideEffect { sideEffect -> @@ -62,6 +63,8 @@ fun OnboardingRoute( OnboardingSideEffect.PermissionRequest -> { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { permissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS) + } else { + onFinish() } }