Skip to content

Instantly share code, notes, and snippets.

@manuelvicnt
Last active July 23, 2019 15:33
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 manuelvicnt/cdb4a91ca954d547bc7b09190552a476 to your computer and use it in GitHub Desktop.
Save manuelvicnt/cdb4a91ca954d547bc7b09190552a476 to your computer and use it in GitHub Desktop.
Static @provides in an abstract Module
@Module
abstract class NetworkModule {
@Binds abstract fun provideService(retrofitService: RetrofitService): Service
@Module
companion object {
@JvmStatic
@Provides
fun provideOkHttpClient(): OkHttpClient {
return return OkHttpClient.Builder().build()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment