Category "dagger"

Expose Dagger provided dependencies through component or module in multi-module app?

I am looking for some guidance on the best code structure for dagger in multi module android apps. Lets say we have featureModuleA and featureModuleB, both of w

Dagger2 @Provides annotation order issue

Say I have MapperModule like below: @Module public class MapperModule { @Singleton @Provides public static ObjectMapper provideObjectMapper () {

Dagger2 @Provides annotation order issue

Say I have MapperModule like below: @Module public class MapperModule { @Singleton @Provides public static ObjectMapper provideObjectMapper () {

How to inject data class in android with dagger where data class parameter have no default value?

My data class like: data class Animal(var id:Int = 2) { } My Provides method in module class like: @Provides @Singleton fun provide():

Dagger 2 component not generated

In my module, in my base Application class component = DaggerCompClassComponent.builder() .classModule(new ModuleClass()).build(); it can no

Is ApplicationComponent deprecated?

I just started using Dagger Hilt for dependency injection on Android and I get a warning on Android Studio saying 'ApplicationComponent' is deprecated. Deprecat

Is ApplicationComponent deprecated?

I just started using Dagger Hilt for dependency injection on Android and I get a warning on Android Studio saying 'ApplicationComponent' is deprecated. Deprecat

Modules that need to be instantiated by Hilt must have a visible, empty constructor

@Module @InstallIn(SingletonComponent::class) class WheelModule constructor(val size:Int) { @Provides fun provideWheel():Wheel = Wheel(size) } Module