I have 3 gradle modules in my 'clean architecture' Android application: 'data', 'domain' and 'presentation'. 'data' and 'presentation' both depend on 'domain', but not each other. 'presentation' holds Application class realization, and 'data' holds realization of some repositories singletons.
I'd like to use Dagger 2 for instantiating repositories in Application, but in this case I need to make indirect gradle dependency between 'data' and 'presentation'. Such a dependency looks ugly from Clean architecture point of view, making possible access 'data' from 'presentation'. Placing Dagger components and modules code in separate gradle module 'di' creates circular gradle dependency 'data' -> 'di' -> 'data'.
Is there a proper way to move all the DI code in separate module?