diff --git a/TODO.md b/TODO.md index e1a636f6..d6d97993 100644 --- a/TODO.md +++ b/TODO.md @@ -182,7 +182,7 @@ lunar_launcher/ ``` #### 단계별 모듈화 실행 순서 -- [ ] **6-1. `:core:common`, `:core:network`, `:core:database` 분리**: `:app` 의존성이 가장 적은 순수 모델(`model/*`), `WorkersDb`, `OkHttpClient`, 유틸부터 하위 모듈로 이동. +- [x] **6-1. `:core:common`, `:core:network`, `:core:database` 분리** (`:core:core-common`, `:core:core-network` 생성 및 `NetworkClient`·`MlKitTranslationHelper` 이동 완료; `:core:database`는 후속 진행) - [ ] **6-2. 독립 기능 우선 분리 (`:feature:torrent`, `:feature:wallpaper`)**: `jlibtorrent` JAR들과 `MyWallpaperService`+`Renderer.cpp`는 타 화면과 결합도가 낮아 가장 먼저 독립 모듈로 분리하기 적합함. - [ ] **6-3. 뷰어/리더 분리 (`:feature:player`, `:feature:reader`)**: `PlayerActivity`/`NativePlayer`(+ `PlayerEngine.cpp`)와 `DocumentViewerActivity`/`ImageViewerActivity`, `TokiFragment`/`WebReaderActivity`를 분리. - [ ] **6-4. 피드/수집기 분리 (`:feature:feeds`)**: `RssHome`, `NeoRssActivity`, `TaskAggregator`, `*Getter`군을 분리하고 `:app`은 런처 홈과 서비스 진입점만 유지. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c2b1a395..ac799549 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -135,6 +135,8 @@ dependencies { "dir" to "libs", "include" to listOf("*.aar", "*.jar"), ))) + implementation(project(":core:core-common")) + implementation(project(":core:core-network")) implementation(project(":gdrive")) implementation("com.google.android.gms:play-services-wearable:19.0.0") val kotlinVersion: String? by extra diff --git a/core/core-common/build.gradle.kts b/core/core-common/build.gradle.kts new file mode 100644 index 00000000..4eeee923 --- /dev/null +++ b/core/core-common/build.gradle.kts @@ -0,0 +1,29 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "bums.lunatic.launcher.core.common" + compileSdk = 35 + + defaultConfig { + minSdk = 26 + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") + implementation("com.google.android.gms:play-services-tasks:18.3.2") + implementation("com.google.mlkit:translate:17.0.3") + implementation("com.google.mlkit:language-id:17.0.5") +} diff --git a/core/core-common/src/main/AndroidManifest.xml b/core/core-common/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8072ee00 --- /dev/null +++ b/core/core-common/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/MlKitTranslationHelper.kt b/core/core-common/src/main/kotlin/bums/lunatic/launcher/utils/MlKitTranslationHelper.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/MlKitTranslationHelper.kt rename to core/core-common/src/main/kotlin/bums/lunatic/launcher/utils/MlKitTranslationHelper.kt diff --git a/core/core-network/build.gradle.kts b/core/core-network/build.gradle.kts new file mode 100644 index 00000000..748b699b --- /dev/null +++ b/core/core-network/build.gradle.kts @@ -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") +} diff --git a/core/core-network/src/main/AndroidManifest.xml b/core/core-network/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8072ee00 --- /dev/null +++ b/core/core-network/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/NetworkClient.kt b/core/core-network/src/main/kotlin/bums/lunatic/launcher/utils/NetworkClient.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/NetworkClient.kt rename to core/core-network/src/main/kotlin/bums/lunatic/launcher/utils/NetworkClient.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index e308f1d1..09c712f0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,5 +23,7 @@ dependencyResolutionManagement { rootProject.name = "LunarLauncher" include ("app") +include(":core:core-common") +include(":core:core-network") include(":gdrive") include(":lun_launcher")