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
| dependencies { | |
| ... | |
| classpath "com.google.dagger:hilt-android-gradle-plugin:{latest-version}" | |
| } |
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
| class AppClass: Application() |
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
| @HiltAndroidApp | |
| class AppClass: Application() |
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
| // Retrofit | |
| implementation 'com.squareup.retrofit2:retrofit:2.9.0' | |
| implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.2" | |
| implementation 'com.squareup.retrofit2:converter-gson:2.9.0' | |
| //coil | |
| implementation "io.coil-kt:coil-compose:1.3.2" |
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
| data class Movie(val name: String, val imageUrl: String, | |
| val desc: String, val category: String) |
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 | |
| object NetworkModule {} |
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
| @InstallIn(SingletonComponent::class) | |
| @Module | |
| object NetworkModule {} |
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
| @InstallIn(SingletonComponent::class) |
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
| @InstallIn(SingletonComponent::class) | |
| @Module | |
| object NetworkModule { | |
| @Singleton | |
| @Provides | |
| fun provideRetrofit(): Retrofit { | |
| return Retrofit.Builder() | |
| .baseUrl("https://howtodoandroid.com/apis/") | |
| .addConverterFactory(GsonConverterFactory.create()) |
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
| @AndroidEntryPoint | |
| class MainActivity : ComponentActivity() {} |
OlderNewer