k

    knthmn

    1 year ago
    I have a class that can be constructor injected, however if I want to install it in a specific component a also scope it, should I put it in a module and
    @Provides
    it?
    FunkyMuse

    FunkyMuse

    1 year ago
    You can just scope that class @MyCustomScope MyClass @Inject constructor() same as you would with
    @Singleton
    k

    knthmn

    1 year ago
    Is it bad to provide it in a module even if it can be constructor injected, just for code organization? I want a single place that I can check the scopes of all my dependencies
    FunkyMuse

    FunkyMuse

    1 year ago
    It's unnecessary to add it, also Dagger2 has a really good integration with Android studio where you can totally see where the dependencies are coming from, but if you want to do it, then do it, it's a preference at the end of the day.