-
Notifications
You must be signed in to change notification settings - Fork 1
feat: R8 난독화 및 리소스 축소 활성화 #379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -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) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. consumer rules 자동 적용 확인 결과 (수동 규칙 추가 불필요):
|
||||||||||||||||||||||||||
| # 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 --- | ||||||||||||||||||||||||||
| # 난독화된 스택 트레이스를 읽을 수 있도록 소스 파일명/라인 번호 유지 | ||||||||||||||||||||||||||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 공식 근거: Firebase Crashlytics — Get readable crash reports
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 정정: 두 가지 부정확한 부분이 있었습니다.
|
||||||||||||||||||||||||||
| # 공식 문서: 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.* { <fields>; } | ||||||||||||||||||||||||||
| -keep class * extends com.google.gson.TypeAdapter | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
공식 근거: Android 공식 문서 — 앱 축소, 난독화 및 최적화
AGP 8.13.2 기준 R8은 compatibility mode(기본)로 동작하며, 각 라이브러리의 consumer rules를 자동으로 병합합니다.