package Ġio . better apps . gr ays ky . di Ċ Ċ import Ġandroid . app . Application Ċ import Ġio . better apps . gr ays ky . data . api . Api Helper Ċ import Ġio . better apps . gr ays ky . data . db . entities . Location Dao Ċ import Ġio . better apps . gr ays ky . data . db . entities . Location Database Ċ import Ġio . better apps . gr ays ky . data . network . Ok HttpClient With Cache Ċ import Ġio . better apps . gr ays ky . data . network . Open Weather Map Service Ċ import Ġio . better apps . gr ays ky . data . network . Ret rofit Factory Ċ import Ġio . better apps . gr ays ky . repository . Location Repository Ċ import Ġio . better apps . gr ays ky . repository . Location Repository Impl Ċ import Ġio . better apps . gr ays ky . repository . Weather Repository Ċ import Ġio . better apps . gr ays ky . repository . Weather Repository Impl Ċ import Ġio . better apps . gr ays ky . ui . main . Main ViewModel Ċ import Ġio . better apps . gr ays ky . ui . weather forecast . Weather ViewModel Ċ import Ġokhttp 3 . Ok HttpClient Ċ import Ġorg . k oin . android . ext . k oin . android Context Ċ import Ġorg . k oin . android . view model . dsl . viewModel Ċ import Ġorg . k oin . dsl . module Ċ Ċ val Ġnetwork Module Ġ= Ġmodule Ġ{ ĊĠĠĠ Ġsingle < Ok HttpClient > Ġ{ ĠOk HttpClient With Cache . instance ( get () Ġas ĠApplication ) Ġ} ĊĠĠĠ Ġsingle < Open Weather Map Service > Ġ{ ĠRet rofit Factory . weather Service ( get () Ġas ĠOk HttpClient ) Ġ} ĊĠĠĠ Ġfactory < Api Helper > Ġ{ ĠApi Helper ( get ()) Ġ} ĊĠĠĠ Ġsingle < Weather Repository > Ġ{ ĊĠĠĠĠĠĠĠ ĠWeather Repository Impl ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget () Ġas ĠApi Helper , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmutable Map Of () ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ val Ġdata Module Ġ= Ġmodule Ġ{ ĊĠĠĠ Ġsingle < Location Database > Ġ{ ĠLocation Database . get Database ( android Context ()) Ġ} ĊĠĠĠ Ġfun Ġprovide Dao ( database : ĠLocation Database ): ĠLocation Dao Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġdatabase . location Dao () ĊĠĠĠ Ġ} ĊĠĠĠ Ġsingle < Location Dao > Ġ{ Ġprovide Dao ( get ()) Ġ} ĊĠĠĠ Ġsingle < Location Repository > Ġ{ ĊĠĠĠĠĠĠĠ ĠLocation Repository Impl ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget () Ġas ĠLocation Dao ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ val Ġmv vm Module Ġ= Ġmodule Ġ{ ĊĠĠĠ ĠviewModel Ġ{ ĠWeather ViewModel ( get () Ġas ĠWeather Repository ) Ġ} ĊĠĠĠ ĠviewModel Ġ{ ĠMain ViewModel ( get () Ġas ĠLocation Repository ) Ġ} Ċ } Ċ Ċ val Ġall Modules Ġ= Ġnetwork Module Ġ+ Ġdata Module Ġ+ Ġmv vm Module Ċ