Skip to content

Instantly share code, notes, and snippets.

@skywall
Created October 24, 2020 20:53
Show Gist options
  • Save skywall/834bd13c0da9f5eb4315b956c0f41b7a to your computer and use it in GitHub Desktop.
Save skywall/834bd13c0da9f5eb4315b956c0f41b7a to your computer and use it in GitHub Desktop.
CoreComponentHolder
object CoreComponentHolder {
private object Component : SingletonHolder<CoreComponent, Application>({ application ->
DaggerCoreComponent.factory().create(application)
})
fun getInstance(application: Application): CoreComponent {
return Component.getInstance(application)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment