Skip to content

Commit 6ac11f1

Browse files
committed
Feat: BuildConfig에 BASE_URL 추가
- debug, release 빌드 타입에 따라 다른 BASE_URL을 사용하도록 설정 - Retrofit, OkHttp 의존성 추가
1 parent f4e3ffd commit 6ac11f1

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

app/build.gradle.kts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ android {
3333
)
3434
}
3535

36+
buildTypes {
37+
debug {
38+
val devUrl = properties["bitnagil.dev.url"] as? String ?: "https://dev.example.com"
39+
buildConfigField("String", "BASE_URL", "\"$devUrl\"")
40+
}
41+
42+
release {
43+
val prodUrl = properties["bitnagil.prod.url"] as? String ?: "https://prod.example.com"
44+
buildConfigField("String", "BASE_URL", "\"$prodUrl\"")
45+
isMinifyEnabled = false
46+
proguardFiles(
47+
getDefaultProguardFile("proguard-android-optimize.txt"),
48+
"proguard-rules.pro",
49+
)
50+
}
51+
}
52+
3653
buildFeatures {
3754
buildConfig = true
3855
}
@@ -46,5 +63,10 @@ dependencies {
4663
implementation(projects.data)
4764
implementation(projects.domain)
4865
implementation(projects.presentation)
66+
4967
implementation(libs.kakao.v2.user)
68+
implementation(platform(libs.retrofit.bom))
69+
implementation(libs.bundles.retrofit)
70+
implementation(platform(libs.okhttp.bom))
71+
implementation(libs.bundles.okhttp)
5072
}

0 commit comments

Comments
 (0)