# android10/android-cleanarchitecture

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/android10-android-cleanarchitecture).**

15,540 stars · 3,276 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/android10/Android-CleanArchitecture
- awesome-repositories: https://awesome-repositories.com/repository/android10-android-cleanarchitecture.md

## Topics

`android` `android-application` `android-architecture` `android-cleanarchitecture` `android-development` `architectural` `java`

## Description

This is a reference implementation of Uncle Bob's clean architecture for Android, structured into distinct domain, data, and presentation layers. The project demonstrates how to organize an Android application around business use cases, keeping domain logic and entities free from framework dependencies.

The architecture enforces dependency inversion through layered separation, where inner domain layers define interfaces that outer layers implement. This approach enables repository abstractions for data source switching, presenter-view separation for testable UI logic, and use-case composition for handling complex business scenarios while maintaining single-responsibility boundaries.

The implementation supports testing each layer in isolation, with unit tests for domain and data layers that run without an emulator, and acceptance tests for the presentation layer. The project serves as a practical guide for structuring Android applications with clean architecture principles.

## Tags

### Data & Databases

- [Repository Patterns](https://awesome-repositories.com/f/data-databases/backend-data-access-layers/repository-patterns.md) — A pattern that decouples data sources from business logic by defining repository interfaces in the domain layer and implementing them in the data layer.
- [Switching Mechanisms](https://awesome-repositories.com/f/data-databases/data-sources/switching-mechanisms.md) — Allows runtime or compile-time swapping of data sources (e.g., remote API vs. local cache) through repository implementations behind a common interface.
- [Domain Models](https://awesome-repositories.com/f/data-databases/object-relational-mappers/domain-models.md) — Encapsulates core business rules and data structures in plain Java/Kotlin objects within the domain layer, free from framework dependencies.

### Software Engineering & Architecture

- [Android Implementations](https://awesome-repositories.com/f/software-engineering-architecture/clean-architecture-frameworks/android-implementations.md) — Structuring an Android app into domain, data, and presentation layers following Uncle Bob's clean architecture principles for maintainable and testable code.
- [Android Samples](https://awesome-repositories.com/f/software-engineering-architecture/clean-architecture-frameworks/android-samples.md) — A reference implementation of Uncle Bob's clean architecture for Android, with separated domain, data, and presentation layers.
- [Reference Implementations](https://awesome-repositories.com/f/software-engineering-architecture/feature-based-project-structures/android-architectures/reference-implementations.md) — A reference implementation for structuring Android applications using clean architecture principles and layer separation.
- [Domain Data Presentation Layers](https://awesome-repositories.com/f/software-engineering-architecture/logic-and-presentation-separation/domain-data-presentation-layers.md) — Separate an application into domain, data, and presentation layers to enforce dependency inversion and isolate business logic. ([source](https://cdn.jsdelivr.net/gh/android10/android-cleanarchitecture@master/README.md))
- [Presenter Patterns](https://awesome-repositories.com/f/software-engineering-architecture/logic-and-presentation-separation/presenter-patterns.md) — A pattern that separates UI logic into presenters transforming domain data into view-ready state, enabling testability without Android framework coupling.
- [Dependency Inversion Patterns](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/dependency-boundary-enforcers/dependency-inversion-patterns.md) — Enforces a strict dependency rule where inner layers define interfaces implemented by outer layers, keeping domain logic framework-agnostic.
- [Android Implementations](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/layered-architectures/android-implementations.md) — An app structure that enforces dependency inversion by isolating business logic into distinct domain, data, and presentation layers.
- [Logic Decoupling](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/modular-decoupled-design/structural-design-paradigms/decoupled-logic-encapsulation/logic-decoupling.md) — Keep use cases and domain models free of framework dependencies to make them reusable and testable in pure code. ([source](https://cdn.jsdelivr.net/gh/android10/android-cleanarchitecture@master/README.md))
- [Composed Use Case Flows](https://awesome-repositories.com/f/software-engineering-architecture/use-case-orchestrators/composed-use-case-flows.md) — Combines multiple use cases within a single presentation flow to handle complex business scenarios while maintaining single-responsibility boundaries.
- [Use Case Driven Architectures](https://awesome-repositories.com/f/software-engineering-architecture/use-case-orchestrators/use-case-driven-architectures.md) — An architecture that organizes application logic around business use cases orchestrating data flow between domain entities and external layers.

### Testing & Quality Assurance

- [Isolated Layer Testing](https://awesome-repositories.com/f/testing-quality-assurance/data-layer-testing/isolated-layer-testing.md) — Run unit tests on domain and data layers without an emulator, and acceptance tests on the UI layer with a testing framework. ([source](https://cdn.jsdelivr.net/gh/android10/android-cleanarchitecture@master/README.md))
