Skip to content

Instantly share code, notes, and snippets.

@Audhil
Last active July 27, 2019 10:05
Show Gist options
  • Save Audhil/e79e5385d2ccf215ed1f7cbd359c1e76 to your computer and use it in GitHub Desktop.
Save Audhil/e79e5385d2ccf215ed1f7cbd359c1e76 to your computer and use it in GitHub Desktop.
open class GitHubDelegate : Application() {
open lateinit var appDaggerComponent: GitHubAppComponent
override fun onCreate() {
super.onCreate()
appDaggerComponent = getAppComponent()
appDaggerComponent.inject(this)
}
// returns app component
open fun getAppComponent(): GitHubAppComponent =
DaggerGitHubAppComponent
.builder()
.applicationModule(ApplicationModule(this))
.build()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment