MVVM(Model View ViewModel) sample in Kotlin using the components ViewModel, LiveData and Coroutines, the libraries Retrofit, Gson, Glide and OkHttp. Also, sealed classes to replace callbacks. Finally for testing, Mockito, Coroutines and Flow.
Unit tests :
- Coroutines 1 version: '1.3.0'
- Coroutines Test 1 version '1.3.0'
- LifeCycleKtx 2 version: '2.2.0'
- ViewModelKtx 2 version: '2.2.0'
- Retrofit 2 version: '2.6.0'
Retrofit '2.3.0' - OkHttp 4 version: '4.0.1'
OkHttp 3.4.1 - Gson version:'2.6.0'
- Glide version: '4.9.0'
- AndroidX version: '1.0.0'
- Arch Lifecycle version: '2.0.0'
- Mockito version: '2.27.0'
- Arch Testing version: '1.1.1'
- Kotlin flow https://codelabs.developers.google.com/codelabs/advanced-kotlin-coroutines
- Testing coroutines on Android (Android Dev Summit 19') https://www.youtube.com/watch?v=KMb0Fs8rCRs&vl=en
- Coroutines with Architecture components https://developer.android.com/topic/libraries/architecture/coroutines?hl=en
- Sealed Classes Instead of Exceptions in Kotlin https://phauer.com/2019/sealed-classes-exceptions-kotlin/
- ViewModel https://developer.android.com/topic/libraries/architecture/viewmodel
- LiveData https://developer.android.com/topic/libraries/architecture/livedata
- Android Architecture Blueprints https://github.com/googlesamples/android-architecture
- Android Jetpack: ViewModel https://www.youtube.com/watch?v=5qlIPTDE274
- Mockito : https://site.mockito.org/
- Unit Testing + Mockito + Kotlin + Architecture components https://medium.com/@marco_cattaneo/unit-testing-with-mockito-on-kotlin-android-project-with-architecture-components-2059eb637912
- Junit + LiveData https://jeroenmols.com/blog/2019/01/17/livedatajunit5/
If you want to contribute in this repository, please send me a pull request or if you want to report some issues please send at https://github.com/emedinaa/kotlin-mvvm/issues
I appreciate any question or comment. Also, if you consider it useful, you can give me a star ⭐ ⭐ ⭐.