Created
July 3, 2020 18:20
-
-
Save mitchtabian/55cb572670aedf6f9045a392fdb68c63 to your computer and use it in GitHub Desktop.
Hilt @provide an interface instance that you do NOT own
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
@Module | |
@InstallIn(ApplicationComponent::class) | |
object NetworkModule { | |
@Singleton | |
@Provides | |
fun provideBlogService(): BlogService{ | |
return Retrofit.Builder() | |
.baseUrl("https://open-api.xyz/placeholder/") | |
.build() | |
.create(BlogService::class.java) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment