Skip to content

Instantly share code, notes, and snippets.

@maskaravivek
Created May 17, 2018 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maskaravivek/c12b491987012a9e6812db1e8c2cf7fa to your computer and use it in GitHub Desktop.
Save maskaravivek/c12b491987012a9e6812db1e8c2cf7fa to your computer and use it in GitHub Desktop.
@Module
open class AppModule(val application: Application) {
@Provides
@Singleton
internal open fun provideContext(): Context {
return application
}
@Provides
@Singleton
internal open fun provideUserService(context: Context): UserService {
return UserService(context)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment