android10 / android10/Android-CleanArchitecture

Why data layer has a dependency on the domain layer?

Open
#136 24 comments 29 reactions 0 assignees View on GitHub
discussion question
Dominant language
Java
Stars
15.5k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

As stated in Clean Architecture, dependencies should point only inwards. This separates layers in a way that they could be interchangeable easily and also decoupled (right?).
In your case, you decided to create 3 layers which have this dependency relationship:

presentation ---> domain ---> data

You use DI for some good reasons (still decoupling, dependency inversion ecc).
However from your build.gradle files, it seems that data has a dependency on domain, while domain doesn't have anything. The dependency is in this way:

presentation ---> domain <--- data

Could you explain me why? Is there something I'm missing?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.