Skip to content

Instantly share code, notes, and snippets.

@fededri
Last active September 2, 2022 16:01
Show Gist options
  • Save fededri/4fcffe3108c989391a9fae427d6be7da to your computer and use it in GitHub Desktop.
Save fededri/4fcffe3108c989391a9fae427d6be7da to your computer and use it in GitHub Desktop.
// Dagger
interface Authenticator
class RealAuthenticator @Inject constructor() : Authenticator
@Module
@ContributesTo(AppScope::class)
abstract class AuthenticatorModule {
@Binds abstract fun bindRealAuthenticator(authenticator: RealAuthenticator): Authenticator
}
//
// Anvil
interface Authenticator
@ContributesBinding(AppScope::class)
class RealAuthenticator @Inject constructor() : Authenticator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment