build: Task 19 완료 - :core:core-common 및 :core:core-network 모듈 분리

- core/core-common 모듈 신규 생성 (namespace: bums.lunatic.launcher.core.common):
  * MlKitTranslationHelper.kt를 :app에서 :core:core-common으로 이동
- core/core-network 모듈 신규 생성 (namespace: bums.lunatic.launcher.core.network):
  * NetworkClient.kt를 :app에서 :core:core-network로 이동 (OkHttp3 api 의존성 노출)
- settings.gradle.kts & app/build.gradle.kts: :core:core-common, :core:core-network 모듈 등록 및 :app 의존성 연결
- TODO.md: 6-1(코어 공통/네트워크 분리) 진행 내역 반영
- 검증: ./gradlew :app:compileDebugKotlin 빌드 성공 확인 (13s, 59 actionable tasks)
This commit is contained in:
2026-11-16 13:15:24 +09:00
parent c9dff8c162
commit f23cc1aa05
9 changed files with 64 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
plugins {
id("com.android.library")
id("kotlin-android")
}
android {
namespace = "bums.lunatic.launcher.core.network"
compileSdk = 35
defaultConfig {
minSdk = 26
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
api("com.squareup.okhttp3:logging-interceptor:4.11.0")
}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest />
@@ -0,0 +1,19 @@
package bums.lunatic.launcher.utils
import okhttp3.ConnectionPool
import okhttp3.OkHttpClient
import java.util.concurrent.TimeUnit
/**
* Shared OkHttpClient singleton to avoid creating per-call connection pools and thread leaks.
*/
object NetworkClient {
val client: OkHttpClient by lazy {
OkHttpClient.Builder()
.connectionPool(ConnectionPool(5, 60, TimeUnit.SECONDS))
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.writeTimeout(30, TimeUnit.SECONDS)
.build()
}
}