|
| 1 | +import java.util.Properties |
| 2 | + |
1 | 3 | plugins { |
2 | | - alias(libs.plugins.android.application) |
3 | | - alias(libs.plugins.kotlin.android) |
4 | | - alias(libs.plugins.kotlin.compose) |
| 4 | + alias(libs.plugins.bitnagil.android.application) |
| 5 | + alias(libs.plugins.bitnagil.android.hilt) |
| 6 | + alias(libs.plugins.kotlin.serialization) |
5 | 7 | } |
6 | 8 |
|
7 | 9 | android { |
8 | 10 | namespace = "com.threegap.bitnagil" |
9 | | - compileSdk = 35 |
| 11 | + |
| 12 | + val properties = |
| 13 | + Properties().apply { |
| 14 | + val propFile = rootProject.file("local.properties") |
| 15 | + if (propFile.exists()) { |
| 16 | + load(propFile.inputStream()) |
| 17 | + } |
| 18 | + } |
| 19 | + |
| 20 | + signingConfigs { |
| 21 | + create("release") { |
| 22 | + keyAlias = properties["release.key.alias"] as? String |
| 23 | + ?: System.getenv("RELEASE_KEY_ALIAS") |
| 24 | + ?: throw GradleException("RELEASE_KEY_ALIAS 값이 없습니다.") |
| 25 | + keyPassword = properties["release.key.password"] as? String |
| 26 | + ?: System.getenv("RELEASE_KEY_PASSWORD") |
| 27 | + ?: throw GradleException("RELEASE_KEY_PASSWORD 값이 없습니다.") |
| 28 | + storePassword = properties["release.keystore.password"] as? String |
| 29 | + ?: System.getenv("RELEASE_KEYSTORE_PASSWORD") |
| 30 | + ?: throw GradleException("RELEASE_KEYSTORE_PASSWORD 값이 없습니다.") |
| 31 | + storeFile = File("${properties["release.keystore.path"]}") |
| 32 | + } |
| 33 | + } |
10 | 34 |
|
11 | 35 | defaultConfig { |
12 | 36 | applicationId = "com.threegap.bitnagil" |
13 | | - minSdk = 28 |
14 | | - targetSdk = 35 |
15 | | - versionCode = 1 |
16 | | - versionName = "1.0" |
17 | 37 |
|
18 | | - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
| 38 | + val kakaoNativeAppKey = |
| 39 | + (properties["kakao.native.app.key"] as? String) |
| 40 | + ?: System.getenv("KAKAO_NATIVE_APP_KEY") |
| 41 | + ?: throw GradleException("KAKAO_NATIVE_APP_KEY 값이 없습니다.") |
| 42 | + |
| 43 | + manifestPlaceholders["KAKAO_NATIVE_APP_KEY"] = kakaoNativeAppKey |
| 44 | + buildConfigField( |
| 45 | + type = "String", |
| 46 | + name = "KAKAO_NATIVE_APP_KEY", |
| 47 | + value = "\"$kakaoNativeAppKey\"", |
| 48 | + ) |
19 | 49 | } |
20 | 50 |
|
21 | 51 | buildTypes { |
| 52 | + debug { |
| 53 | + val devUrl = properties["bitnagil.dev.url"] as? String |
| 54 | + ?: System.getenv("BITNAGIL_DEV_URL") |
| 55 | + ?: throw GradleException("bitnagil.dev.url 값이 없습니다.") |
| 56 | + buildConfigField("String", "BASE_URL", "\"$devUrl\"") |
| 57 | + } |
| 58 | + |
22 | 59 | release { |
| 60 | + val prodUrl = properties["bitnagil.prod.url"] as? String |
| 61 | + ?: System.getenv("BITNAGIL_PROD_URL") |
| 62 | + ?: throw GradleException("bitnagil.prod.url 값이 없습니다.") |
| 63 | + buildConfigField("String", "BASE_URL", "\"$prodUrl\"") |
23 | 64 | isMinifyEnabled = false |
24 | 65 | proguardFiles( |
25 | 66 | getDefaultProguardFile("proguard-android-optimize.txt"), |
26 | | - "proguard-rules.pro" |
| 67 | + "proguard-rules.pro", |
27 | 68 | ) |
| 69 | + signingConfig = signingConfigs.getByName("release") |
28 | 70 | } |
29 | 71 | } |
30 | | - compileOptions { |
31 | | - sourceCompatibility = JavaVersion.VERSION_11 |
32 | | - targetCompatibility = JavaVersion.VERSION_11 |
33 | | - } |
34 | | - kotlinOptions { |
35 | | - jvmTarget = "11" |
36 | | - } |
| 72 | + |
37 | 73 | buildFeatures { |
38 | | - compose = true |
| 74 | + buildConfig = true |
39 | 75 | } |
40 | 76 | } |
41 | 77 |
|
42 | 78 | dependencies { |
| 79 | + implementation(projects.core.datastore) |
| 80 | + implementation(projects.core.designsystem) |
| 81 | + implementation(projects.core.network) |
| 82 | + implementation(projects.core.security) |
| 83 | + implementation(projects.data) |
| 84 | + implementation(projects.domain) |
| 85 | + implementation(projects.presentation) |
43 | 86 |
|
44 | | - implementation(libs.androidx.core.ktx) |
45 | | - implementation(libs.androidx.lifecycle.runtime.ktx) |
46 | | - implementation(libs.androidx.activity.compose) |
47 | | - implementation(platform(libs.androidx.compose.bom)) |
48 | | - implementation(libs.androidx.ui) |
49 | | - implementation(libs.androidx.ui.graphics) |
50 | | - implementation(libs.androidx.ui.tooling.preview) |
51 | | - implementation(libs.androidx.material3) |
52 | | - testImplementation(libs.junit) |
53 | | - androidTestImplementation(libs.androidx.junit) |
54 | | - androidTestImplementation(libs.androidx.espresso.core) |
55 | | - androidTestImplementation(platform(libs.androidx.compose.bom)) |
56 | | - androidTestImplementation(libs.androidx.ui.test.junit4) |
57 | | - debugImplementation(libs.androidx.ui.tooling) |
58 | | - debugImplementation(libs.androidx.ui.test.manifest) |
| 87 | + implementation(libs.kakao.v2.user) |
| 88 | + implementation(platform(libs.retrofit.bom)) |
| 89 | + implementation(libs.bundles.retrofit) |
| 90 | + implementation(platform(libs.okhttp.bom)) |
| 91 | + implementation(libs.bundles.okhttp) |
59 | 92 | } |
0 commit comments