feat(characters): Koin module + nav graph + wire into :app (REDI-89)

- charactersPresentationModule: viewModelOf(::CharacterListViewModel) (in the UI-agnostic module).
- @Serializable CharacterListRoute + NavGraphBuilder.charactersGraph { composable<CharacterListRoute> }
  in presentation-compose (serialization plugin added for type-safe routes).
- :app registers coreDataModule + charactersDataModule + charactersPresentationModule in startKoin,
  and hosts a NavHost(startDestination = CharacterListRoute) calling charactersGraph.
- core:data manifest declares INTERNET (merges into :app) for live API calls.
This commit is contained in:
2026-06-10 12:52:14 +02:00
parent dd4576409d
commit ef50094e3e
7 changed files with 66 additions and 19 deletions

View File

@@ -1,5 +1,7 @@
plugins {
alias(libs.plugins.architecture.android.feature)
// For @Serializable type-safe navigation routes.
alias(libs.plugins.architecture.kotlinx.serialization)
}
android {

View File

@@ -0,0 +1,21 @@
package com.example.architecture.feature.characters.presentation.compose
import androidx.navigation.NavGraphBuilder
import androidx.navigation.compose.composable
import kotlinx.serialization.Serializable
/** Type-safe route for the characters list screen. */
@Serializable
data object CharacterListRoute
/**
* The characters feature nav graph. `:app` only calls this and supplies cross-screen navigation as
* a callback. The detail destination is added here in a later milestone.
*/
fun NavGraphBuilder.charactersGraph(
onCharacterClick: (Int) -> Unit,
) {
composable<CharacterListRoute> {
CharacterListRoot(onCharacterClick = onCharacterClick)
}
}