android-clean-architecture
适用于 Android 和 Kotlin Multiplatform 项目的 Clean Architecture 模式——模块结构、依赖规则、UseCases、Repositories 和数据层模式。适用于在 Android 或 KMP 项目中组织模块、分层或数据流时。
机器翻译查看英文原文
Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.
适用对象:移动应用开发。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Android Clean Architecture
- When to Activate
- Module Structure
- Recommended Layout
- Dependency Rules
- Domain Layer
- UseCase Pattern
- Domain Models
Clean Architecture patterns for Android and KMP projects. Covers module boundaries, dependency inversion, UseCase/Repository patterns, and data layer design with Room, SQLDelight, and Ktor. Structuring Android or KMP project modules Implementing UseCases, Repositories, or DataSources Designing data flow between layers (domain, data, presentation) Setting up dependency injection with Koin or Hilt Working with Room, SQLDelight, or Ktor in a layered architecture Critical: domain must NEVER depend on data, presentation, or any framework. It contains pure Kotlin only. Each UseCase represents one business operation. Use operator fun invoke for clean call sites: Domain models are plain Kotlin data classes — no framework annotations: Defined in domain, implemented in data: Coordinates between local and remote data sources: Keep mappers as extension functions near the data models: Use Result or a custom sealed type for error propagation: For KMP projects, use convention plugins to reduce build file duplication: Apply in modules: Importing Android framework classes in domain — keep it pure Kotlin Exposing database entities or DTOs to the UI layer — always map to domain models Putting busines
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- affaan-m/ECC
- 源文件
- pi/core/skills/android-clean-architecture/SKILL.md
- 固定版本
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:affaan-m/ECC · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:42.817Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。