Skip to content

Latest commit

 

History

History
20 lines (18 loc) · 497 Bytes

README.md

File metadata and controls

20 lines (18 loc) · 497 Bytes

Hilt Install Binding Extension

A Hilt extension that reduces a bit of boilerplate for single implementation bindings. Example usage:

@InstallBinding(SingletonComponent::class)
class AuthenticatorImpl @Inject constructor(): Authenticator

the above example is equivalent to:

@Module
@InstallIn(SingletonComponent::class)
interface BindAuthModule {
  @Binds
  fun bind(impl: AuthenticatorImpl): Authenticator
}

Disclaimer

This is not an official Google product.