项目作者: boymustafa

项目描述 :
Koin + Coroutines with MVVM in Kotlin
高级语言: Kotlin
项目地址: git://github.com/boymustafa/Doggies.git
创建时间: 2020-05-18T06:35:08Z
项目社区:https://github.com/boymustafa/Doggies

开源协议:

下载


Doggies

Koin + Coroutines with MVVM in Kotlin

This repo is demonstrate how to develop Android app with good practices using Koin and Coroutines. The design pattern that I use is MVVM. Why MVVM? because Google support it with the new LiveData and ViewModel libraries. The app use [thedogapi] (https://dog.ceo/dog-api/documentation/random) to show random images of dogs. It will show the list of dogs in MainActivity.

Libraries that I use in this repo:

  1. // Glide for loading and caching dog images
  2. implementation 'com.github.bumptech.glide:glide:4.9.0'
  3. kapt 'com.github.bumptech.glide:compiler:4.9.0'
  4. // Retrofit as our REST service
  5. implementation 'com.squareup.retrofit2:retrofit:2.5.0'
  6. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
  7. implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
  8. // Koin for the dependencies injections
  9. implementation 'org.koin:koin-android-viewmodel:2.0.0-rc-2'
  10. // Coroutines for asynchronous calls (and Deferred’s adapter)
  11. implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.0'
  12. implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.0'
  13. // Coroutines - Deferred adapter
  14. implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'