This commit introduces a comprehensive set of features, establishing the core functionality of the application using an MVVM architecture with Hilt for dependency injection.
**Key Changes:**
* **UI & Navigation:**
* Implemented navigation between the main feed, post details, and login screens using Jetpack Navigation Compose.
* Added `TalkScreen` for displaying a feed of posts and `PostDetailScreen` for viewing individual posts and their comments.
* Created a `LoginScreen` with input fields and authentication logic.
* Introduced `PostCardItem` and `CommentItem` Composables for a consistent and reusable UI.
* Added shared element transitions for a smoother user experience when navigating to post details.
* **Architecture & State Management:**
* Integrated Hilt for dependency injection across ViewModels and Repositories.
* Created ViewModels (`TalkViewModel`, `PostDetailViewModel`, `UserViewModel`, `CommentViewModel`, etc.) to manage UI state and business logic.
* Implemented Repository pattern for abstracting data sources from the backend API.
* Defined UI state data classes to ensure a predictable and observable state flow.
* **Data & Models:**
* Introduced data models for `PostCard` and `CommentCard` to aggregate and display complex data structures.
* Added `PostDetailRepository` to orchestrate fetching of post and comment data concurrently.
* Refined DTOs, such as `CreateCommentDto`, for API interactions.
* **Dependencies & Tooling:**
* Added Hilt, Navigation Compose, and Lifecycle ViewModel dependencies.
* Included the `pangu-jvm` library for improved text formatting with spacing between Chinese and English characters.
70 lines
4.3 KiB
TOML
70 lines
4.3 KiB
TOML
[versions]
|
|
agp = "8.12.3"
|
|
coilCompose = "2.7.0"
|
|
kotlin = "2.2.20"
|
|
coreKtx = "1.17.0"
|
|
junit = "4.13.2"
|
|
junitVersion = "1.3.0"
|
|
espressoCore = "3.7.0"
|
|
lifecycleRuntimeKtx = "2.9.4"
|
|
activityCompose = "1.11.0"
|
|
composeBom = "2025.09.01"
|
|
materialIconsCore = "1.7.8"
|
|
panguJvm = "0.2.0"
|
|
retrofit = "3.0.0"
|
|
okhttp = "4.12.0"
|
|
gson = "2.13.2"
|
|
securityCrypto = "1.1.0"
|
|
datastore = "1.1.7"
|
|
hilt = "2.57.2"
|
|
hiltNavigationCompose = "1.3.0"
|
|
navigationCompose = "2.9.5"
|
|
uiGraphics = "1.9.2"
|
|
animationCore = "1.9.2"
|
|
|
|
[libraries]
|
|
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
|
androidx-material-icons-core = { module = "androidx.compose.material:material-icons-core", version.ref = "materialIconsCore" }
|
|
androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "materialIconsCore" }
|
|
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coilCompose" }
|
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
|
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
|
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
|
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
|
|
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
|
|
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
|
|
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
|
|
androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
|
|
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
|
|
androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
|
|
androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
|
|
androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
|
|
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
|
|
androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigationCompose" }
|
|
pangu-jvm = { module = "io.github.darkokoa:pangu-jvm", version.ref = "panguJvm" }
|
|
retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" }
|
|
retrofit-converter-gson = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit" }
|
|
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
|
|
okhttp-logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" }
|
|
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
|
|
androidx-security-crypto = { group = "androidx.security", name = "security-crypto", version.ref = "securityCrypto" }
|
|
androidx-datastore-preferences = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "datastore" }
|
|
|
|
# Hilt dependencies
|
|
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
|
|
hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "hilt" }
|
|
androidx-hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "hiltNavigationCompose" }
|
|
|
|
# ViewModel dependencies
|
|
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycleRuntimeKtx" }
|
|
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleRuntimeKtx" }
|
|
ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics", version.ref = "uiGraphics" }
|
|
androidx-animation-core = { group = "androidx.compose.animation", name = "animation-core", version.ref = "animationCore" }
|
|
|
|
[plugins]
|
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
|
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
|
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
|
hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
|
|
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
|