package Ġxyz . team gravity . shopping list test . injection Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroidx . room . Room Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . components . Singleton Component Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory Ċ import Ġxyz . team gravity . shopping list test . api . Pix ab ay Api Ċ import Ġxyz . team gravity . shopping list test . helper . constants . Pix ab ay Api Constants Ċ import Ġxyz . team gravity . shopping list test . helper . constants . Shopping Database Ċ import Ġxyz . team gravity . shopping list test . view model . My Database Ċ import Ġxyz . team gravity . shopping list test . view model . Parent Repository Ċ import Ġxyz . team gravity . shopping list test . view model . Shopping Dao Ċ import Ġxyz . team gravity . shopping list test . view model . Shopping Repository Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ @ Install In ( Singleton Component :: class ) Ċ object ĠApplication Module Ġ{ ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide My Database ( app : ĠApplication ) Ġ= ĠRoom . database Builder ( app , ĠMy Database :: class . java , ĠShop ping Database . DATABASE _ NAME ). build () ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Shopping Dao ( db : ĠMy Database ) Ġ= Ġdb . dao () ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Pix ab ay Api (): ĠP ix ab ay Api Ġ= ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ()) ĊĠĠĠĠĠĠĠ Ġ. baseUrl ( Pix ab ay Api Constants . BASE _ URL ) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġ. create ( Pix ab ay Api :: class . java ) ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Default Shopping Repository ( dao : ĠShop ping Dao , Ġapi : ĠP ix ab ay Api ): ĠParent Repository Ġ= ĠShop ping Repository ( dao , Ġapi ) Ċ }