diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 5d7f7f15..4ff10c2f 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 커넥션 풀 공유 | +| `:core:core-utils` | 파일/이미지/인코딩/Jsoup/한글변환/설정/카테고리 유틸리티 17종 | `:core:core-common`, `:core:core-network` 의존 | | `: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` 의존 | diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a38035cc..a6a1d144 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(":core:core-utils")) implementation(project(":feature:feature-player")) implementation(project(":feature:feature-reader")) implementation(project(":feature:feature-torrent")) diff --git a/core/core-utils/build.gradle.kts b/core/core-utils/build.gradle.kts new file mode 100644 index 00000000..fa9e7a23 --- /dev/null +++ b/core/core-utils/build.gradle.kts @@ -0,0 +1,32 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "bums.lunatic.launcher.core.utils" + 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(project(":core:core-network")) + implementation("androidx.appcompat:appcompat:1.7.1") + implementation("androidx.core:core-ktx:1.15.0") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") + implementation("org.jsoup:jsoup:1.21.2") + implementation("com.googlecode.juniversalchardet:juniversalchardet:1.0.3") +} diff --git a/core/core-utils/src/main/AndroidManifest.xml b/core/core-utils/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8072ee00 --- /dev/null +++ b/core/core-utils/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/APILevel.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/APILevel.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/APILevel.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/APILevel.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/AlphabetToChosungMap.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/AlphabetToChosungMap.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/AlphabetToChosungMap.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/AlphabetToChosungMap.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/BitmapConverter.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/BitmapConverter.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/BitmapConverter.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/BitmapConverter.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/CategoryManualMapper.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/CategoryManualMapper.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/CategoryManualMapper.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/CategoryManualMapper.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/CommonUtils.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/CommonUtils.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/CommonUtils.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/CommonUtils.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/CompressStringUtil.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/CompressStringUtil.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/CompressStringUtil.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/CompressStringUtil.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/EnToKo.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/EnToKo.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/EnToKo.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/EnToKo.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/FileUtils.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/FileUtils.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/FileUtils.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/FileUtils.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/HashUtils.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/HashUtils.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/HashUtils.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/HashUtils.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/ImageUtils.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/ImageUtils.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/ImageUtils.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/ImageUtils.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/JsoupUtils.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/JsoupUtils.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/JsoupUtils.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/JsoupUtils.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/KoreanTrans.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/KoreanTrans.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/KoreanTrans.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/KoreanTrans.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/MediaBitmapUtil.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/MediaBitmapUtil.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/MediaBitmapUtil.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/MediaBitmapUtil.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/PlayCategory.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/PlayCategory.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/PlayCategory.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/PlayCategory.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/PreferencesUtil.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/PreferencesUtil.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/PreferencesUtil.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/PreferencesUtil.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/RssList.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/RssList.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/RssList.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/RssList.kt diff --git a/app/src/main/kotlin/bums/lunatic/launcher/utils/StringEscapeUtils.kt b/core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/StringEscapeUtils.kt similarity index 100% rename from app/src/main/kotlin/bums/lunatic/launcher/utils/StringEscapeUtils.kt rename to core/core-utils/src/main/kotlin/bums/lunatic/launcher/utils/StringEscapeUtils.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index d39b32e7..1b17b044 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(":core:core-utils") include(":feature:feature-player") include(":feature:feature-reader") include(":feature:feature-torrent")