Paul
06/01/2021, 7:24 PMinterface ImageLoader
@BindType
class GlideImageLoader @Inject constructor(): ImageLoader
and HiltBinder will generate the following:
@Module
@InstallIn(SingletonComponent.class)
public interface HiltBinder_SingletonComponentModule {
@Binds
ImageLoader bind_GlideImageLoader(GlideImageLoader binding);
}
HiltBinder supports lots of features:
• Specifying a particular type to bind to.
• Installing bindings in both Dagger Hilt's predefined and custom components.
• Contributing bindings into a set and map collections (Dagger multibindings).
• Associating bindings with Dagger qualifiers.
• KSP support.
For more info, take a look at the GitHub repository that contains extensive documentation for the API as well as sample application to showcase the library in action.ninad thakare
06/01/2021, 10:35 PM