Created
June 29, 2019 17:53
-
-
Save jeremyrempel/e9fec39f2e085b6835c05b39a72a16a4 to your computer and use it in GitHub Desktop.
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 | |
| class ServiceModule { | |
| @Provides | |
| @Singleton | |
| fun providesRetrofit(): Retrofit { | |
| return Retrofit.Builder() | |
| .baseUrl("https://api.github.com/") | |
| .build(); | |
| } | |
| @Provides | |
| @Singleton | |
| fun providesService(): GitHubService { | |
| return retrofit.create(GitHubService.class); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment