Skip to content

Instantly share code, notes, and snippets.

@iChintanSoni
Last active April 17, 2018 11:04
Show Gist options
  • Save iChintanSoni/35c7506bd1cc6789ca949ac821e0fade to your computer and use it in GitHub Desktop.
Save iChintanSoni/35c7506bd1cc6789ca949ac821e0fade to your computer and use it in GitHub Desktop.
class MyApplication : DaggerApplication() {
override fun onCreate() {
super.onCreate()
initializeTimber()
}
private fun initializeTimber() {
if (BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree())
}
}
override fun applicationInjector(): AndroidInjector<out DaggerApplication> {
val appComponent = DaggerAppComponent.builder().application(this).build()
appComponent.inject(this)
return appComponent
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment