From 6cfedb96536196b89fec1bdecfcaea07ecaa449e Mon Sep 17 00:00:00 2001 From: jung0115 Date: Tue, 15 Oct 2024 16:13:54 +0900 Subject: [PATCH] =?UTF-8?q?KKUMI-110=20[FIX]=20#82=20-=20=EB=82=9C?= =?UTF-8?q?=EB=8F=85=ED=99=94=20=EB=AC=B8=EC=A0=9C=EB=A5=BC=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0=ED=95=98=EB=8A=94=20=EC=B5=9C=EC=A2=85=20proguard-rul?= =?UTF-8?q?es.pro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 4 ++-- app/proguard-rules.pro | 15 ++++++++++++--- app/release/output-metadata.json | 2 +- core/data/proguard-rules.pro | 7 ++++++- gradle.properties | 4 +--- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 91fd872..21d9c85 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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", diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 98a9402..bfb7cc3 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -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.* { ; } @@ -38,4 +38,13 @@ -keep class org.conscrypt.* -keep class org.openjsse.** --keep class androidx.databinding.** { *; } \ No newline at end of file +# 기타 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 \ No newline at end of file diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 55d24bf..bd05148 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,7 +11,7 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 1, + "versionCode": 2, "versionName": "1.0.0", "outputFile": "app-release.apk" } diff --git a/core/data/proguard-rules.pro b/core/data/proguard-rules.pro index 31a63a7..d8df836 100644 --- a/core/data/proguard-rules.pro +++ b/core/data/proguard-rules.pro @@ -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> \ No newline at end of file +-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 \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 6dc67e2..aff0d5f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file +# thereby reducing the size of the R class for that library \ No newline at end of file