feat(characters:data): DTOs, mappers, data source, repo, Koin module (REDI-86)

- @Serializable CharacterDto/CharactersResponseDto/PageInfoDto in dto/.
- mappers/CharacterMapper.kt: internal, pure toDomain()/toCharacter()/toCharacterDetails();
  nextPage parsed from info.next URL. No mapping inside DTO/data-source classes.
- KtorCharacterDataSource via the typed HttpClient.get helpers (errors -> DataError.Network).
- NetworkCharacterRepository (not *Impl) maps DTO -> domain; DataError.Network widens to DataError.
- charactersDataModule: singleOf(::KtorCharacterDataSource) + singleOf(::NetworkCharacterRepository) { bind<CharacterRepository>() }.
- core:data: expose ktor-client-core as api (public inline helpers are inlined into consumers) and
  move Timber logging into a @PublishedApi internal fn so Timber doesn't leak across modules.
This commit is contained in:
2026-06-10 12:37:40 +02:00
parent 600f12259d
commit 0bb96baa4d
9 changed files with 164 additions and 4 deletions

View File

@@ -19,4 +19,7 @@ android {
dependencies {
implementation(project(":core:domain"))
implementation(libs.timber)
// `api`: the public inline HttpClient.get/post/delete helpers are inlined into consumer modules,
// so those modules need the Ktor request/response types on their compile classpath.
api(libs.ktor.client.core)
}