I recently heard and researched about Clean Architecture and am trying to implement it on my own to understand it deeply, I know Domain module(layer) has the logic and should have some interfaces as well as UseCases which use the repositories. As far as I learned, the Domain layer does not have access to any other layers but Data and Presentation layer has access to the Domain layer but not to each other.
My repositories definition (Interfaces) are in the Domain module and their implementation is in Data module and then injected by Dagger. Also, I have some UseCases which inject some repositories.
The problem that I have is, the Presentation module has access to the repositories interfaces and use-cases as both are in the Domain module and are imported with gradle in the Presentation layer.
I do not think having access to both in the Presentation module would be good, I am using Kotlin and internal keyword to isolate classes for each module but as Data module needs to have access to repositories interfaces to implement them, I cannot use internal keyword for them so they are exposed now.
My question is, would it be possible to change the design somehow to expose only the use-cases?
If UseCase is related to data (e.g. ReadUserUseCase), then it's interface should stay in the domain module and the implementation should be moved to the data module.