MVVM(Model View ViewModel) sample in Kotlin using the components ViewModel, LiveData, the libraries Retrofit, Glide and Mockito for testing.
Android MVVM https://docs.google.com/presentation/d/1nTwtU8OWYs_8Q3i_3hOPAWodDpDKzO--uA-4b6LUr8g/edit?usp=sharing
Android MVVM Clean https://docs.google.com/presentation/d/1luTzvqGaMjVycEx109-AjYIj3FIpXYAt3Mnu-gjqxtc/edit?usp=sharing
-
Added state flow. branch State Flow
-
Added jetpack compose. branch compose
-
Added rxjava library. branch rx-kotlin
-
Add navigation component library. branch navigation-component
-
Added viewbinding support and kotlin extensions were removed. branch viewbinding
-
Added dependency injection with Hilt, included android tests branch hilt
-
Added unit tests with Flow branch flow
-
Added kotlin Flow and fragment ktx branch flow
-
Room branch room
-
Added View Binding branch viewbinding
-
Dependencies versions were updated and ViewModelProviders class was removed (deprecated). all branches
-
Added Coroutines with retrofit and sealed classes to replace callbacks. Included testing with Coroutines. branch coroutines
-
Added Koin, dependency injection framework written in Kotlin. Included integration with Mockito for testing (11th Oct) branch koin
-
Added Unit Testing with Mockito (27th May) Link
- Retrofit 2 version: '2.3.0'
- OkHttp 3 version: '3.4.1'
- Glide version: '4.9.0'
- AndroidX version: '1.2.0'
- Arch Lifecycle version: '2.4.0'
- Mockito version: '2.27.0'
- Arch Testing version: '2.4.0'
- State Flow https://developer.android.com/kotlin/flow/stateflow-and-sharedflow
- 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 ⭐ ⭐ ⭐.