Skip to content

Commit

Permalink
KKUMI-110 [FIX] #82 - 난독화 문제를 해결하는 최종 proguard-rules.pro
Browse files Browse the repository at this point in the history
  • Loading branch information
jung0115 committed Oct 15, 2024
1 parent 13a313e commit 6cfedb9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ android {

buildTypes {
release {
minifyEnabled false
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders = [
appName : "@string/app_name",
// appIcon: "@drawable/ic_mykkumi_logo",
Expand Down
15 changes: 12 additions & 3 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#-renamesourcefileattribute SourceFile
-keep class com.marastro.mykkumi.common_ui.** { *; }
-keep class com.marastro.mykkumi.data.** { *; }
#-keep class java.lang.invoke.StringConcatFactory { *; }
-keep class com.marastro.mykkumi.common_ui.base.BaseFragment { *; }
-keep class java.lang.invoke.StringConcatFactory { *; }
-dontwarn java.lang.invoke.StringConcatFactory
-keep class com.marastro.mykkumi.common_ui.base.BaseFragment

# 카카오 로그인을 위한 카카오 SDK를 코드 축소, 난독화, 최적화에서 제외
-keep class com.kakao.sdk.**.model.* { <fields>; }
Expand All @@ -38,4 +38,13 @@
-keep class org.conscrypt.*
-keep class org.openjsse.**

-keep class androidx.databinding.** { *; }
# 기타 ProGuard 설정
-keep class !a.a, * { *; }
-dontwarn a.a

-keep class androidx.databinding.** { *; }

# Missing Rule
-dontwarn hilt_aggregated_deps._com_marastro_mykkumi_data_di_DataStoreModule
-dontwarn hilt_aggregated_deps._com_marastro_mykkumi_data_di_NetworkModule
-dontwarn hilt_aggregated_deps._com_marastro_mykkumi_data_di_RepositoryModule
2 changes: 1 addition & 1 deletion app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionCode": 2,
"versionName": "1.0.0",
"outputFile": "app-release.apk"
}
Expand Down
7 changes: 6 additions & 1 deletion core/data/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@

# R8 full mode strips generic signatures from return types if not kept.
-if interface * { @retrofit2.http.* public *** *(...); }
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>

# Missing Rule
-dontwarn hilt_aggregated_deps._com_marastro_mykkumi_data_di_DataStoreModule
-dontwarn hilt_aggregated_deps._com_marastro_mykkumi_data_di_NetworkModule
-dontwarn hilt_aggregated_deps._com_marastro_mykkumi_data_di_RepositoryModule
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ android.useAndroidX=true
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.enableR8.fullMode=false
# thereby reducing the size of the R class for that library

0 comments on commit 6cfedb9

Please sign in to comment.