-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
103 lines (90 loc) · 3.56 KB
/
build.gradle.kts
File metadata and controls
103 lines (90 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import java.util.Properties
plugins {
alias(libs.plugins.bitnagil.android.application)
alias(libs.plugins.bitnagil.android.hilt)
alias(libs.plugins.bitnagil.kotlin.serialization)
}
android {
val properties =
Properties().apply {
val propFile = rootProject.file("local.properties")
if (propFile.exists()) {
load(propFile.inputStream())
}
}
signingConfigs {
create("release") {
keyAlias = properties["release.key.alias"] as? String
?: System.getenv("RELEASE_KEY_ALIAS")
?: throw GradleException("RELEASE_KEY_ALIAS 값이 없습니다.")
keyPassword = properties["release.key.password"] as? String
?: System.getenv("RELEASE_KEY_PASSWORD")
?: throw GradleException("RELEASE_KEY_PASSWORD 값이 없습니다.")
storePassword = properties["release.keystore.password"] as? String
?: System.getenv("RELEASE_KEYSTORE_PASSWORD")
?: throw GradleException("RELEASE_KEYSTORE_PASSWORD 값이 없습니다.")
storeFile = File("${properties["release.keystore.path"]}")
}
}
defaultConfig {
val kakaoNativeAppKey =
(properties["kakao.native.app.key"] as? String)
?: System.getenv("KAKAO_NATIVE_APP_KEY")
?: throw GradleException("KAKAO_NATIVE_APP_KEY 값이 없습니다.")
manifestPlaceholders["KAKAO_NATIVE_APP_KEY"] = kakaoNativeAppKey
buildConfigField(
type = "String",
name = "KAKAO_NATIVE_APP_KEY",
value = "\"$kakaoNativeAppKey\"",
)
val kakaoRestApiKey =
(properties["kakao.rest.api.key"] as? String)
?: System.getenv("KAKAO_REST_API_KEY")
?: throw GradleException("KAKAO_REST_API_KEY 값이 없습니다.")
buildConfigField(
type = "String",
name = "KAKAO_REST_API_KEY",
value = "\"$kakaoRestApiKey\"",
)
}
buildTypes {
debug {
applicationIdSuffix = ".debug"
versionNameSuffix = "-DEBUG"
isDebuggable = true
val devUrl = properties["bitnagil.dev.url"] as? String
?: System.getenv("BITNAGIL_DEV_URL")
?: throw GradleException("bitnagil.dev.url 값이 없습니다.")
buildConfigField("String", "BASE_URL", "\"$devUrl\"")
}
release {
val prodUrl = properties["bitnagil.prod.url"] as? String
?: System.getenv("BITNAGIL_PROD_URL")
?: throw GradleException("bitnagil.prod.url 값이 없습니다.")
buildConfigField("String", "BASE_URL", "\"$prodUrl\"")
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
signingConfig = signingConfigs.getByName("release")
}
}
buildFeatures {
buildConfig = true
}
}
dependencies {
implementation(projects.core.datastore)
implementation(projects.core.designsystem)
implementation(projects.core.network)
implementation(projects.core.security)
implementation(projects.data)
implementation(projects.domain)
implementation(projects.presentation)
implementation(libs.kakao.v2.user)
implementation(platform(libs.retrofit.bom))
implementation(libs.bundles.retrofit)
implementation(platform(libs.okhttp.bom))
implementation(libs.bundles.okhttp)
}