Skip to content

Instantly share code, notes, and snippets.

@tfcporciuncula
Created March 25, 2019 23:52
Show Gist options
  • Save tfcporciuncula/2b3bc267cef41188b4f1ccd048490690 to your computer and use it in GitHub Desktop.
Save tfcporciuncula/2b3bc267cef41188b4f1ccd048490690 to your computer and use it in GitHub Desktop.
SimpleAssistedInjectApplication
class SimpleAssistedInjectApplication : Application() {
val component: ApplicationComponent by lazy {
DaggerApplicationComponent.builder()
.applicationContext(applicationContext)
.build()
}
}
val Activity.component get() = (application as SimpleAssistedInjectApplication).component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment