Last active
September 17, 2020 16:13
-
-
Save hantrungkien/feaafd6e38e3524d34266b07d1c753a6 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 | |
@InstallIn(ApplicationComponent::class) | |
object CoreModule { | |
@Provides | |
@Singleton | |
@UserModelSingletonQualifier | |
fun provideUserModel() = UserModel(value = "Singleton") | |
} |
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
@Qualifier | |
@Retention(AnnotationRetention.BINARY) | |
annotation class UserModelSingletonQualifier | |
@Qualifier | |
@Retention(AnnotationRetention.BINARY) | |
annotation class UserModelFeatureQualifier |
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 UserModel(var value: String = "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment