Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ android {
?: System.getenv("BITNAGIL_PROD_URL")
?: throw GradleException("bitnagil.prod.url 값이 없습니다.")
buildConfigField("String", "BASE_URL", "\"$prodUrl\"")
isMinifyEnabled = false
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
Expand Down
60 changes: 42 additions & 18 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
# 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
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile

# 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 *;
#}
# [Kakao SDK 버그 방어]
# AccessTokenInterceptor에서 ClientErrorCause 상수를 리플렉션(getField)으로 찾기 때문에 난독화에서 제외함
-keep enum com.kakao.sdk.common.model.ClientErrorCause {
*;
}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# [Kotlinx Serialization]
# 모든 @Serializable 클래스의 직렬화 로직 및 serializer 메서드 유지
-keepattributes Annotation, InnerClasses, Signature, Exceptions
-keepclassmembers class * {
@kotlinx.serialization.Serializable *;
}
-keepclassmembers class * {
kotlinx.serialization.KSerializer serializer(...);
}

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# [Domain/Data Layer Enums]
# API 응답 매핑 및 리플렉션 방어를 위해 Enum 상수 이름 유지
-keepclassmembers enum com.threegap.bitnagil.domain.**.model.** {
<fields>;
}
-keepclassmembers enum com.threegap.bitnagil.data.**.model.** {
<fields>;
}

# [Compose Navigation Type-Safe Arguments]
# 네비게이션 인자 클래스 및 Route 객체 보존
-keep class com.threegap.bitnagil.presentation.**.model.navarg.** { *; }
-keep class com.threegap.bitnagil.Route** { *; }
# HomeRoute는 navigation.home 패키지로 Route** 패턴 밖이므로 별도 보호
# Compose Navigation이 내부적으로 serializer descriptor name을 route ID로 사용하므로
# deep link 추가 시 repackaging으로 빌드마다 route string이 달라지는 문제 방어
-keep class com.threegap.bitnagil.navigation.home.HomeRoute** { *; }

# [Kotlin Result - Retrofit 반환 타입]
# suspend fun foo(): Result<T> 형태의 Retrofit 인터페이스에서
# R8이 kotlin.Result의 제네릭 타입 인자를 지워 call adapter 탐색 실패 방어
-keep class kotlin.Result { *; }

# [Network Libraries]
# Retrofit 및 OkHttp 어노테이션 유지
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
package com.threegap.bitnagil.designsystem.font

import androidx.compose.ui.text.ExperimentalTextApi
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontVariation
import androidx.compose.ui.text.font.FontWeight
import com.threegap.bitnagil.designsystem.R

@OptIn(ExperimentalTextApi::class)
val pretendard = FontFamily(
Font(R.font.pretendard_black, FontWeight.Black, FontStyle.Normal),
Font(R.font.pretendard_extra_bold, FontWeight.ExtraBold, FontStyle.Normal),
Font(R.font.pretendard_bold, FontWeight.Bold, FontStyle.Normal),
Font(R.font.pretendard_semi_bold, FontWeight.SemiBold, FontStyle.Normal),
Font(R.font.pretendard_medium, FontWeight.Medium, FontStyle.Normal),
Font(R.font.pretendard_regular, FontWeight.Normal, FontStyle.Normal),
Font(R.font.pretendard_light, FontWeight.Light, FontStyle.Normal),
Font(R.font.pretendard_extra_light, FontWeight.ExtraLight, FontStyle.Normal),
Font(R.font.pretendard_thin, FontWeight.Thin, FontStyle.Normal),
Font(
resId = R.font.pretendard_variable,
weight = FontWeight.Bold,
variationSettings = FontVariation.Settings(FontVariation.weight(700)),
),
Font(
resId = R.font.pretendard_variable,
weight = FontWeight.SemiBold,
variationSettings = FontVariation.Settings(FontVariation.weight(600)),
),
Font(
resId = R.font.pretendard_variable,
weight = FontWeight.Medium,
variationSettings = FontVariation.Settings(FontVariation.weight(500)),
),
Font(
resId = R.font.pretendard_variable,
weight = FontWeight.Normal,
variationSettings = FontVariation.Settings(FontVariation.weight(400)),
),
)

val cafe24SsurroundAir = FontFamily(
Font(R.font.cafe_24_ssurround_air_v1_1, FontWeight.Light, FontStyle.Normal),
Font(R.font.cafe_24_ssurround_air_v1_1, FontWeight.Light),
)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions core/network/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# [ResultCallAdapter]
# Retrofit Call Adapter 팩토리 및 네트워크 모델 보존
-keep class com.threegap.bitnagil.network.calladapter.** { *; }
-keep class com.threegap.bitnagil.network.model.** { *; }
4 changes: 4 additions & 0 deletions data/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# [Retrofit Service Interfaces]
# R8이 제네릭 시그니처를 제거하면 ResultCallAdapterFactory가 Call<Result<T>>의
# 타입 인자를 런타임에 읽지 못해 "Unable to create call adapter" 에러 발생
-keep interface com.threegap.bitnagil.data.**.service.** { *; }