build: Task 24 완료 - :feature:feature-reader 1차 모듈 분리 (WebReaderActivity, PagedTextLayout, TouchArea)
- core/core-common: SimpleGesture.kt를 :app에서 :core:core-common으로 이동 (BuildConfig 경로 현행화) - feature/feature-reader 모듈 신규 생성 (namespace: bums.lunatic.launcher.feature.reader): * WebReaderActivity.kt 및 activity_wr.xml 이동 (R 네임스페이스 분리) * PagedTextLayout.kt 이동 및 layout_textviewer/뷰 ID를 companion object 주입(LunaticLauncher 바인딩)으로 디커플링 * Settings.kt에서 TouchArea enum을 feature-reader의 TouchArea.kt로 추출 - settings.gradle.kts, app/build.gradle.kts, ARCHITECTURE.md, TODO.md(6-3 갱신) 업데이트 - 검증: ./gradlew :app:compileDebugKotlin 빌드 성공 확인 (19s, 121 actionable tasks)
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
| `:core:core-database` | Realm Kotlin 모델(`model/*`, `TokizModels`, `RecentCall`), `WorkersDb`, `CustMigration` | `io.realm.kotlin` api 노출 |
|
| `:core:core-database` | Realm Kotlin 모델(`model/*`, `TokizModels`, `RecentCall`), `WorkersDb`, `CustMigration` | `io.realm.kotlin` api 노출 |
|
||||||
| `:core:core-network` | 공용 `OkHttpClient` 싱글톤(`NetworkClient`) | OkHttp3 커넥션 풀 공유 |
|
| `:core:core-network` | 공용 `OkHttpClient` 싱글톤(`NetworkClient`) | OkHttp3 커넥션 풀 공유 |
|
||||||
| `:feature:feature-player` | `NativePlayer`, `PageIndexer`, `ImageViewerActivity` 미디어/이미지 뷰어 코어 | `PhotoView`, `ExifInterface`, `Glide` |
|
| `:feature:feature-player` | `NativePlayer`, `PageIndexer`, `ImageViewerActivity` 미디어/이미지 뷰어 코어 | `PhotoView`, `ExifInterface`, `Glide` |
|
||||||
|
| `:feature:feature-reader` | `WebReaderActivity`, `PagedTextLayout`, `TouchArea` 리더 코어 | `:core:core-common` 의존 |
|
||||||
| `:feature:feature-torrent` | `TorrentService`/`TorrentTask` 및 `jlibtorrent` JAR 격리 모듈 | `:core:core-common` 의존 |
|
| `:feature:feature-torrent` | `TorrentService`/`TorrentTask` 및 `jlibtorrent` JAR 격리 모듈 | `:core:core-common` 의존 |
|
||||||
| `:feature:feature-wallpaper` | `MyWallpaperService`/`NativeRenderer` 라이브 월페이퍼 모듈 | `:core:core-common`, `:core:core-database` 의존 |
|
| `:feature:feature-wallpaper` | `MyWallpaperService`/`NativeRenderer` 라이브 월페이퍼 모듈 | `:core:core-common`, `:core:core-database` 의존 |
|
||||||
| `:gdrive` | Google Drive `appDataFolder` 기반 로그인 및 백업 모듈 | `:app`에서 `implementation(project(":gdrive"))`로 참조 |
|
| `:gdrive` | Google Drive `appDataFolder` 기반 로그인 및 백업 모듈 | `:app`에서 `implementation(project(":gdrive"))`로 참조 |
|
||||||
|
|||||||
@@ -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-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` 모두 분리 완료)
|
- [x] **6-2. 독립 기능 우선 분리 (`:feature:torrent`, `:feature:wallpaper`)** (`:feature:feature-torrent`, `:feature:feature-wallpaper` 모두 분리 완료)
|
||||||
- [x] **6-3. 뷰어/리더 분리 (`:feature:player`, `:feature:reader`)** (`:feature:feature-player` 1차 분리 완료: `NativePlayer`, `PageIndexer`, `ImageViewerActivity`)
|
- [x] **6-3. 뷰어/리더 분리 (`:feature:player`, `:feature:reader`)** (`:feature:feature-player`, `:feature:feature-reader` 모두 1차 분리 완료: `NativePlayer`·`PageIndexer`·`ImageViewerActivity`, `WebReaderActivity`·`PagedTextLayout`·`TouchArea`)
|
||||||
- [ ] **6-4. 피드/수집기 분리 (`:feature:feeds`)**: `RssHome`, `NeoRssActivity`, `TaskAggregator`, `*Getter`군을 분리하고 `:app`은 런처 홈과 서비스 진입점만 유지.
|
- [ ] **6-4. 피드/수집기 분리 (`:feature:feeds`)**: `RssHome`, `NeoRssActivity`, `TaskAggregator`, `*Getter`군을 분리하고 `:app`은 런처 홈과 서비스 진입점만 유지.
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ dependencies {
|
|||||||
implementation(project(":core:core-database"))
|
implementation(project(":core:core-database"))
|
||||||
implementation(project(":core:core-network"))
|
implementation(project(":core:core-network"))
|
||||||
implementation(project(":feature:feature-player"))
|
implementation(project(":feature:feature-player"))
|
||||||
|
implementation(project(":feature:feature-reader"))
|
||||||
implementation(project(":feature:feature-torrent"))
|
implementation(project(":feature:feature-torrent"))
|
||||||
implementation(project(":feature:feature-wallpaper"))
|
implementation(project(":feature:feature-wallpaper"))
|
||||||
implementation(project(":gdrive"))
|
implementation(project(":gdrive"))
|
||||||
|
|||||||
@@ -118,6 +118,13 @@ prefs:
|
|||||||
PrefHelper.initialize(this)
|
PrefHelper.initialize(this)
|
||||||
bums.lunatic.launcher.model.RssDataType.enabledChecker = { key -> PrefHelper.getBoolean(key, false) }
|
bums.lunatic.launcher.model.RssDataType.enabledChecker = { key -> PrefHelper.getBoolean(key, false) }
|
||||||
bums.lunatic.launcher.workers.WorkersDb.schemaVersion = BuildConfig.BuildDateTime
|
bums.lunatic.launcher.workers.WorkersDb.schemaVersion = BuildConfig.BuildDateTime
|
||||||
|
bums.lunatic.launcher.home.tokiz.view.PagedTextLayout.apply {
|
||||||
|
layoutResId = R.layout.layout_textviewer
|
||||||
|
firstViewId = R.id.first_view
|
||||||
|
secondViewId = R.id.sencond_view
|
||||||
|
currentPageId = R.id.current_page
|
||||||
|
currentChapterId = R.id.current_chapter
|
||||||
|
}
|
||||||
bums.lunatic.launcher.wall.MyWallpaperService.weatherSummaryProvider = {
|
bums.lunatic.launcher.wall.MyWallpaperService.weatherSummaryProvider = {
|
||||||
bums.lunatic.launcher.workers.LocationUpdateService.lastWeather
|
bums.lunatic.launcher.workers.LocationUpdateService.lastWeather
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,9 +91,6 @@ fun getIndex(collection : PairArray<Any>, key : String) : Int {
|
|||||||
}
|
}
|
||||||
return returns
|
return returns
|
||||||
}
|
}
|
||||||
enum class TouchArea {
|
|
||||||
Left,Center,Right, DoubleLeft, DoubleRight
|
|
||||||
}
|
|
||||||
|
|
||||||
class Settings : CommonActivity() {
|
class Settings : CommonActivity() {
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import android.os.SystemClock
|
|||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.View.OnTouchListener
|
import android.view.View.OnTouchListener
|
||||||
import bums.lunatic.launcher.BuildConfig
|
import bums.lunatic.launcher.core.common.BuildConfig
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
import kotlin.math.sqrt
|
import kotlin.math.sqrt
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("kotlin-android")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "bums.lunatic.launcher.feature.reader"
|
||||||
|
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.constraintlayout:constraintlayout:2.2.0")
|
||||||
|
implementation("androidx.core:core-ktx:1.15.0")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest />
|
||||||
+1
-1
@@ -22,7 +22,7 @@ import android.widget.Toast
|
|||||||
import androidx.activity.OnBackPressedCallback
|
import androidx.activity.OnBackPressedCallback
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import bums.lunatic.launcher.R
|
import bums.lunatic.launcher.feature.reader.R
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import bums.lunatic.launcher.utils.Blog
|
import bums.lunatic.launcher.utils.Blog
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package bums.lunatic.launcher.home.tokiz
|
||||||
|
|
||||||
|
enum class TouchArea {
|
||||||
|
Left, Center, Right, DoubleLeft, DoubleRight
|
||||||
|
}
|
||||||
+16
-6
@@ -17,7 +17,6 @@ import android.widget.TextView
|
|||||||
import androidx.appcompat.widget.AppCompatTextView
|
import androidx.appcompat.widget.AppCompatTextView
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.constraintlayout.widget.Guideline
|
import androidx.constraintlayout.widget.Guideline
|
||||||
import bums.lunatic.launcher.R
|
|
||||||
import bums.lunatic.launcher.home.tokiz.TouchArea
|
import bums.lunatic.launcher.home.tokiz.TouchArea
|
||||||
import bums.lunatic.launcher.utils.Blog
|
import bums.lunatic.launcher.utils.Blog
|
||||||
import bums.lunatic.launcher.utils.SimpleFingerGestures
|
import bums.lunatic.launcher.utils.SimpleFingerGestures
|
||||||
@@ -161,12 +160,23 @@ class PagedTextLayout : ConstraintLayout , PagedTextGenerateInterface {
|
|||||||
|
|
||||||
var currentPageTextView : TextView? = null
|
var currentPageTextView : TextView? = null
|
||||||
var currentChapter : TextView? = null
|
var currentChapter : TextView? = null
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
var layoutResId: Int = 0
|
||||||
|
var firstViewId: Int = 0
|
||||||
|
var secondViewId: Int = 0
|
||||||
|
var currentPageId: Int = 0
|
||||||
|
var currentChapterId: Int = 0
|
||||||
|
}
|
||||||
|
|
||||||
fun initView(context: Context) {
|
fun initView(context: Context) {
|
||||||
inflate(context, R.layout.layout_textviewer, this)
|
val pkg = context.packageName
|
||||||
mainTextView = findViewById(R.id.first_view)
|
val resId = if (layoutResId != 0) layoutResId else context.resources.getIdentifier("layout_textviewer", "layout", pkg)
|
||||||
sencondTextView = findViewById(R.id.sencond_view)
|
inflate(context, resId, this)
|
||||||
currentPageTextView = findViewById(R.id.current_page)
|
mainTextView = findViewById(if (firstViewId != 0) firstViewId else context.resources.getIdentifier("first_view", "id", pkg))
|
||||||
currentChapter = findViewById(R.id.current_chapter)
|
sencondTextView = findViewById(if (secondViewId != 0) secondViewId else context.resources.getIdentifier("sencond_view", "id", pkg))
|
||||||
|
currentPageTextView = findViewById(if (currentPageId != 0) currentPageId else context.resources.getIdentifier("current_page", "id", pkg))
|
||||||
|
currentChapter = findViewById(if (currentChapterId != 0) currentChapterId else context.resources.getIdentifier("current_chapter", "id", pkg))
|
||||||
if (mPagedTextViewInterface?.usePageInfo() ?: false) {
|
if (mPagedTextViewInterface?.usePageInfo() ?: false) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -27,6 +27,7 @@ include(":core:core-common")
|
|||||||
include(":core:core-database")
|
include(":core:core-database")
|
||||||
include(":core:core-network")
|
include(":core:core-network")
|
||||||
include(":feature:feature-player")
|
include(":feature:feature-player")
|
||||||
|
include(":feature:feature-reader")
|
||||||
include(":feature:feature-torrent")
|
include(":feature:feature-torrent")
|
||||||
include(":feature:feature-wallpaper")
|
include(":feature:feature-wallpaper")
|
||||||
include(":gdrive")
|
include(":gdrive")
|
||||||
|
|||||||
Reference in New Issue
Block a user