Created
August 5, 2019 07:45
-
-
Save marukami/4b2d6f7c1218c5430125b8657c13831a to your computer and use it in GitHub Desktop.
Nested Dagger 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(includes = [NetworkModule.OkHttpClientModule::class]) | |
abstract class NetworkModule { | |
@Binds abstract fun provideService(retrofitService: RetrofitService): Service | |
@Module | |
object OkHttpClientModule { | |
@JvmStatic | |
@Provides | |
fun provideOkHttpClient(): OkHttpClient { | |
return OkHttpClient.Builder().build() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment