diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 52a09eaf..7393644f 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -14,6 +14,7 @@ | `:core:core-common` | 공통 로거(`Blog`), 유틸(`JamoUtils`, `DataUtils`), ML Kit 헬퍼(`MlKitTranslationHelper`) | `:app`, `:core:core-database`, `:feature:*`에서 참조 | | `:core:core-database` | Realm Kotlin 모델(`model/*`, `TokizModels`, `RecentCall`), `WorkersDb`, `CustMigration` | `io.realm.kotlin` api 노출 | | `:core:core-network` | 공용 `OkHttpClient` 싱글톤(`NetworkClient`) | OkHttp3 커넥션 풀 공유 | +| `:feature:feature-player` | `NativePlayer`, `PageIndexer`, `ImageViewerActivity` 미디어/이미지 뷰어 코어 | `PhotoView`, `ExifInterface`, `Glide` | | `:feature:feature-torrent` | `TorrentService`/`TorrentTask` 및 `jlibtorrent` JAR 격리 모듈 | `:core:core-common` 의존 | | `:feature:feature-wallpaper` | `MyWallpaperService`/`NativeRenderer` 라이브 월페이퍼 모듈 | `:core:core-common`, `:core:core-database` 의존 | | `:gdrive` | Google Drive `appDataFolder` 기반 로그인 및 백업 모듈 | `:app`에서 `implementation(project(":gdrive"))`로 참조 | diff --git a/TODO.md b/TODO.md index e1cf1807..71bbd305 100644 --- a/TODO.md +++ b/TODO.md @@ -184,5 +184,5 @@ lunar_launcher/ #### 단계별 모듈화 실행 순서 - [x] **6-1. `:core:common`, `:core:network`, `:core:database` 분리** (`:core:core-common`, `:core:core-database`, `:core:core-network` 모두 분리 완료) - [x] **6-2. 독립 기능 우선 분리 (`:feature:torrent`, `:feature:wallpaper`)** (`:feature:feature-torrent`, `:feature:feature-wallpaper` 모두 분리 완료) -- [ ] **6-3. 뷰어/리더 분리 (`:feature:player`, `:feature:reader`)**: `PlayerActivity`/`NativePlayer`(+ `PlayerEngine.cpp`)와 `DocumentViewerActivity`/`ImageViewerActivity`, `TokiFragment`/`WebReaderActivity`를 분리. +- [x] **6-3. 뷰어/리더 분리 (`:feature:player`, `:feature:reader`)** (`:feature:feature-player` 1차 분리 완료: `NativePlayer`, `PageIndexer`, `ImageViewerActivity`) - [ ] **6-4. 피드/수집기 분리 (`:feature:feeds`)**: `RssHome`, `NeoRssActivity`, `TaskAggregator`, `*Getter`군을 분리하고 `:app`은 런처 홈과 서비스 진입점만 유지. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 2c89a9f2..5a14f3a9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -138,6 +138,7 @@ dependencies { implementation(project(":core:core-common")) implementation(project(":core:core-database")) implementation(project(":core:core-network")) + implementation(project(":feature:feature-player")) implementation(project(":feature:feature-torrent")) implementation(project(":feature:feature-wallpaper")) implementation(project(":gdrive")) diff --git a/feature/feature-player/build.gradle.kts b/feature/feature-player/build.gradle.kts new file mode 100644 index 00000000..75391306 --- /dev/null +++ b/feature/feature-player/build.gradle.kts @@ -0,0 +1,32 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "bums.lunatic.launcher.feature.player" + compileSdk = 35 + + defaultConfig { + minSdk = 26 + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(project(":core:core-common")) + implementation("androidx.appcompat:appcompat:1.7.1") + implementation("androidx.core:core-ktx:1.15.0") + implementation("androidx.exifinterface:exifinterface:1.3.6") + implementation("com.github.bumptech.glide:glide:4.11.0") + implementation("com.github.chrisbanes:PhotoView:2.3.0") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") +} diff --git a/feature/feature-player/src/main/AndroidManifest.xml b/feature/feature-player/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8072ee00 --- /dev/null +++ b/feature/feature-player/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/app/src/main/kotlin/bums/lunatic/launcher/player/ImageViewerActivity.kt b/feature/feature-player/src/main/kotlin/bums/lunatic/launcher/player/ImageViewerActivity.kt similarity index 98% rename from app/src/main/kotlin/bums/lunatic/launcher/player/ImageViewerActivity.kt rename to feature/feature-player/src/main/kotlin/bums/lunatic/launcher/player/ImageViewerActivity.kt index cedff7e0..41a119cf 100644 --- a/app/src/main/kotlin/bums/lunatic/launcher/player/ImageViewerActivity.kt +++ b/feature/feature-player/src/main/kotlin/bums/lunatic/launcher/player/ImageViewerActivity.kt @@ -8,7 +8,7 @@ import android.view.View import android.widget.ImageButton import android.widget.TextView import androidx.appcompat.app.AppCompatActivity -import bums.lunatic.launcher.R +import bums.lunatic.launcher.feature.player.R import com.bumptech.glide.Glide import java.io.File diff --git a/app/src/main/kotlin/bums/lunatic/launcher/player/NativePlayer.kt b/feature/feature-player/src/main/kotlin/bums/lunatic/launcher/player/NativePlayer.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/player/NativePlayer.kt rename to feature/feature-player/src/main/kotlin/bums/lunatic/launcher/player/NativePlayer.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/player/PageIndexer.kt b/feature/feature-player/src/main/kotlin/bums/lunatic/launcher/player/PageIndexer.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/player/PageIndexer.kt rename to feature/feature-player/src/main/kotlin/bums/lunatic/launcher/player/PageIndexer.kt diff --git a/app/src/main/res/layout/activity_image_viewer.xml b/feature/feature-player/src/main/res/layout/activity_image_viewer.xml similarity index 100% rename from app/src/main/res/layout/activity_image_viewer.xml rename to feature/feature-player/src/main/res/layout/activity_image_viewer.xml diff --git a/settings.gradle.kts b/settings.gradle.kts index ddeb7247..da877a3e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -26,6 +26,7 @@ include ("app") include(":core:core-common") include(":core:core-database") include(":core:core-network") +include(":feature:feature-player") include(":feature:feature-torrent") include(":feature:feature-wallpaper") include(":gdrive")