{"id":3700,"url":"https://github.com/emedinaa/kotlin-mvvm","last_synced_at":"2025-08-03T23:34:05.082Z","repository":{"id":46324760,"uuid":"181977788","full_name":"emedinaa/kotlin-mvvm","owner":"emedinaa","description":"MVVM(Model View ViewModel) sample in Kotlin using the components ViewModel, LiveData and Retrofit library","archived":false,"fork":false,"pushed_at":"2023-06-11T03:40:26.000Z","size":41479,"stargazers_count":531,"open_issues_count":3,"forks_count":118,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-08-16T16:49:22.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emedinaa.png","metadata":{"files":{"readme":"README.es.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-04-17T22:33:51.000Z","updated_at":"2024-08-09T02:41:52.000Z","dependencies_parsed_at":"2022-09-05T08:01:28.012Z","dependency_job_id":"da72f288-0769-4e7c-bcd5-611501605a45","html_url":"https://github.com/emedinaa/kotlin-mvvm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emedinaa%2Fkotlin-mvvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emedinaa%2Fkotlin-mvvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emedinaa%2Fkotlin-mvvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emedinaa%2Fkotlin-mvvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emedinaa","download_url":"https://codeload.github.com/emedinaa/kotlin-mvvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228576890,"owners_count":17939645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:16:48.958Z","updated_at":"2024-12-07T07:30:43.521Z","avatar_url":"https://github.com/emedinaa.png","language":"Kotlin","funding_links":[],"categories":["Resources"],"sub_categories":["Code examples"],"readme":"# kotlin-mvvm\n\nLanguages: [English](README.md), [Spanish](README.es.md)\n\n[![Kotlin](https://img.shields.io/badge/kotlin-1.4.30-blue.svg)](http://kotlinlang.org) [![Gradle](https://img.shields.io/badge/gradle-4.0.0-%2366DCB8.svg)](https://developer.android.com/studio/releases/gradle-plugin) [![Mockito](https://img.shields.io/badge/mockito-2.27.0-orange.svg)](https://site.mockito.org/)\n\nMVVM(Model View ViewModel) ejemplo en Kotlin usando los componentes : ViewModel, LiveData, las bibliotecas Retrofit, Glide y Mockito para pruebas unitarias.\n\n### MVVM Pattern (Model View ViewModel)\n \u003cimg src=\"assets/AndroidMVVM.png\"\u003e\n\n### Demo\n\n\u003cimg src=\"assets/kotlinmvvmscreenrotation720.gif?raw=true\" height=\"480\"\u003e\n\n\u003cimg src=\"assets/kotlinmvvm720.gif?raw=true\" height=\"480\"\u003e \n\n### Architecture\n\u003cimg src=\"assets/architecture.png\" height=\"540\"\u003e\n\n### Flow\n\u003cimg src=\"assets/MVVMFlow.png\" height=\"540\"\u003e\n \n### Screenshots\n\n\u003cimg src=\"assets/screenshot.png\" height=\"480\"\u003e \u003cimg src=\"assets/screenshot_error.png\" height=\"480\"\u003e \u003cimg src=\"assets/screenshot_empty.png\" height=\"480\"\u003e\n\n\u003cimg src=\"assets/unit_tests.png\" height=\"196\"\u003e \n\n### Slides\n\nAndroid MVVM https://docs.google.com/presentation/d/1nTwtU8OWYs_8Q3i_3hOPAWodDpDKzO--uA-4b6LUr8g/edit?usp=sharing\n\nAndroid MVVM Clean https://docs.google.com/presentation/d/1luTzvqGaMjVycEx109-AjYIj3FIpXYAt3Mnu-gjqxtc/edit?usp=sharing\n\n### Updates [Julio 2022]\n\n- Se agregó State Flow. [branch state-flow](https://github.com/emedinaa/kotlin-mvvm/tree/state-flow)\n\n- Se agregó jetpack compose. [branch compose](https://github.com/emedinaa/kotlin-mvvm/tree/compose)\n\n- Se agregó la biblioteca rxjava. [branch rx-kotlin](https://github.com/emedinaa/kotlin-mvvm/tree/rxkotlin)\n\n- Se agregó la biblioteca navigation component. [branch navigation-component](https://github.com/emedinaa/kotlin-mvvm/tree/navigation-component)\n\n- Se agregó soporte a viewbinding y se removió kotlin extensions. [branch viewbinding](https://github.com/emedinaa/kotlin-mvvm/tree/viewbinding)\n\n- Se agregó inyección de dependencias con Hilt dependency, incluye android tests. [branch hilt](https://github.com/emedinaa/kotlin-mvvm/tree/hilt)\n\n- Se agregó tests unitarios con Flow [branch flow](https://github.com/emedinaa/kotlin-mvvm/tree/flow)\n\n- Se agregó Kotlin Flow y la dependencias Fragment Ktx [branch flow](https://github.com/emedinaa/kotlin-mvvm/tree/flow)\n\n- Se agregó un ejemplo con Room [branch room](https://github.com/emedinaa/kotlin-mvvm/tree/room)\n\n- Se agregó View Binding [branch viewbinding](https://github.com/emedinaa/kotlin-mvvm/tree/viewbinding)\n\n- Se actualizó las versiones de las dependencias del proyecto y se removio la clase ViewModelProviders(deprecated). [all branches](https://github.com/emedinaa/kotlin-mvvm/)\n\n- Se agregó coroutines con Retrofit y sealed classes(clases selladas) para reemplazar los callbacks. Incluye tests unitarios con coroutines. [branch coroutines](https://github.com/emedinaa/kotlin-mvvm/tree/coroutines)\n\n- Se agregó Koin, framework de inyección de dependencias escrito en Kotlin, Incluye también integración con Mockito para los tests unitarios.(11th Oct) [branch koin](https://github.com/emedinaa/kotlin-mvvm/tree/koin)\n\n- Se agregó tests unitarios con Mockito (27th May) [Link](https://github.com/emedinaa/kotlin-mvvm/commit/92d9e5a659c21178364d0b51e904fd126b0b6204)\n\n- Se resolvió la carga de images en Android 9.0(Pie) por Carlos Ugaz [carlosgub](https://github.com/carlosgub) [Link](https://github.com/emedinaa/kotlin-mvvm/pull/1)\n\n\n### Dependencies\n\n- Retrofit 2 [version: '2.3.0'](https://square.github.io/retrofit/)\n- OkHttp 3 [version: '3.4.1'](https://square.github.io/okhttp/)\n- Glide [version: '4.9.0'](https://github.com/bumptech/glide)\n- AndroidX [version: '1.2.0'](https://mvnrepository.com/artifact/androidx)\n- Arch Lifecycle [version: '2.4.0'](https://developer.android.com/jetpack/androidx/releases/lifecycle)\n- Mockito [version: '2.27.0'](https://site.mockito.org/)\n- Arch Testing [version: '2.4.0'](https://mvnrepository.com/artifact/android.arch.core/core-testing?repo=google)\n\n### References\n\n- ViewModel https://developer.android.com/topic/libraries/architecture/viewmodel\n- LiveData https://developer.android.com/topic/libraries/architecture/livedata\n- Android Architecture Blueprints https://github.com/googlesamples/android-architecture\n- Android Jetpack: ViewModel https://www.youtube.com/watch?v=5qlIPTDE274\n- Mockito : https://site.mockito.org/\n- Unit Testing + Mockito + Kotlin + Architecture components https://medium.com/@marco_cattaneo/unit-testing-with-mockito-on-kotlin-android-project-with-architecture-components-2059eb637912\n- Junit + LiveData https://jeroenmols.com/blog/2019/01/17/livedatajunit5/\n\n### Contributing and reporting issues\n\nSi deseas contribuir en este repositorio, por favor enviar un Pull Request o si quieres reportar algún error por favor enviar a https://github.com/emedinaa/kotlin-mvvm/issues\n\nCualquier duda o consulta es bienvenida. También, si consideras que este repositorio útil, puedes darle una estrella ⭐ ⭐ ⭐.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femedinaa%2Fkotlin-mvvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femedinaa%2Fkotlin-mvvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femedinaa%2Fkotlin-mvvm/lists"}