diff --git a/app/build.gradle b/app/build.gradle index 30cca0cc..4823fa70 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,8 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 39325c2f..63fa6423 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,25 +1,16 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html +# =========================== +# Runnect ProGuard/R8 Rules +# =========================== +# 각 라이브러리의 공식 문서 또는 공식 저장소에 근거한 규칙만 포함합니다. +# consumer rules로 자동 적용되는 라이브러리는 별도 규칙을 추가하지 않습니다. +# (Retrofit, OkHttp, Kotlin Serialization, Glide, Naver Map SDK, DataBinding, Hilt, Gson) -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} +# --- Firebase Crashlytics --- +# 난독화된 스택 트레이스를 읽을 수 있도록 소스 파일명/라인 번호 유지 +# 공식 문서: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=android +-keepattributes SourceFile,LineNumberTable +-keep public class * extends java.lang.Exception -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile - -# https://developers.kakao.com/docs/latest/en/getting-started/sdk-android#configure-for-shrinking-and-obfuscation-(optional) +# --- Kakao SDK --- +# 공식 문서: https://developers.kakao.com/docs/latest/en/android/getting-started#configure-for-shrinking-and-obfuscation-(optional) -keep class com.kakao.sdk.**.model.* { ; } --keep class * extends com.google.gson.TypeAdapter \ No newline at end of file