Last active
April 17, 2018 11:04
-
-
Save iChintanSoni/35c7506bd1cc6789ca949ac821e0fade to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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