Skip to content

Instantly share code, notes, and snippets.

@ramonrabello
Created August 2, 2020 04:30
Show Gist options
  • Save ramonrabello/83b1bef77ef0c2a8f4b86c1533ca9207 to your computer and use it in GitHub Desktop.
Save ramonrabello/83b1bef77ef0c2a8f4b86c1533ca9207 to your computer and use it in GitHub Desktop.
Hilt Series: Migrando do Dagger para o Hilt - AuditModule
// Dagger 2
@Module
abstract class AuditModule {
@Binds
abstract fun provideLogger(impl: AuditLogger): Logger
}
// With Hilt
@InstallIn(ActivityComponent::class)
@Module
abstract class AuditModule {
@Binds
abstract fun provideLogger(impl: AuditLogger): Logger
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment