An open API service indexing awesome lists of open source software.

https://github.com/danysantiago/hilt-install-binding


https://github.com/danysantiago/hilt-install-binding

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

# Hilt Install Binding Extension

A Hilt extension that reduces a bit of boilerplate for single implementation bindings.
Example usage:
```kotlin
@InstallBinding(SingletonComponent::class)
class AuthenticatorImpl @Inject constructor(): Authenticator
```
the above example is equivalent to:
```kotlin
@Module
@InstallIn(SingletonComponent::class)
interface BindAuthModule {
@Binds
fun bind(impl: AuthenticatorImpl): Authenticator
}
```

## Disclaimer
This is **not** an official Google product.