Last active
July 23, 2019 15:33
-
-
Save manuelvicnt/cdb4a91ca954d547bc7b09190552a476 to your computer and use it in GitHub Desktop.
Static @provides in an abstract Module
This file contains hidden or 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
@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