package Ġdev . rick n out . r ug by rank er . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . datastore . core . DataStore Ċ import Ġandroidx . datastore . preferences . core . Preferences Ċ import Ġandroidx . datastore . preferences . create DataStore Ċ import Ġandroidx . room . Room Ċ import Ġandroidx . work . Work Manager Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġdagger . h ilt . components . Singleton Component Ċ import Ġdev . rick n out . r ug by rank er . core . api . World R ug by Service Ċ import Ġdev . rick n out . r ug by rank er . core . db . Ranking Dao Ċ import Ġdev . rick n out . r ug by rank er . db . R ug by Rank er Database Ċ import Ġdev . rick n out . r ug by rank er . live . work . Live Match Work Manager Ċ import Ġdev . rick n out . r ug by rank er . match . data . Match Repository Ċ import Ġdev . rick n out . r ug by rank er . news . data . News Repository Ċ import Ġdev . rick n out . r ug by rank er . prediction . data . Prediction Repository Ċ import Ġdev . rick n out . r ug by rank er . ranking . data . Ranking DataStore Ċ import Ġdev . rick n out . r ug by rank er . ranking . data . Ranking Repository Ċ import Ġdev . rick n out . r ug by rank er . ranking . work . Ranking Work Manager Ċ import Ġdev . rick n out . r ug by rank er . theme . data . Theme DataStore Ċ import Ġdev . rick n out . r ug by rank er . theme . data . Theme Repository Ċ import Ġokhttp 3 . Ok HttpClient Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory Ċ import Ġretrofit 2 . create Ċ import Ġjava . util . concurrent . TimeUnit Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Install In ( Singleton Component :: class ) Ċ @ Module Ċ class ĠApp Module Ġ{ ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Ok HttpClient (): ĠOk HttpClient Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠOk HttpClient . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. connect Timeout ( 1 , ĠTimeUnit . MIN UTES ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. read Timeout ( 1 , ĠTimeUnit . MIN UTES ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Ret rofit ( ok HttpClient : ĠOk HttpClient ): ĠRet rofit Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. client ( ok HttpClient ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl ( World R ug by Service . BASE _ URL ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Service ( ret rofit : ĠRet rofit ): ĠWorld R ug by Service Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġretrofit . create () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Database (@ ApplicationContext Ġcontext : ĠContext ): ĠR ug by Rank er Database Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRoom . database Builder ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcontext , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR ug by Rank er Database :: class . java , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠR ug by Rank er Database . DATABASE _ NAME ĊĠĠĠĠĠĠĠ Ġ). build () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Ranking Dao ( database : ĠR ug by Rank er Database ): ĠRank ing Dao Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġdatabase . ranking Dao () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide DataStore (@ ApplicationContext Ġcontext : ĠContext ): ĠData Store < Preferences > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcontext . create DataStore ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġname Ġ= ĠDATA _ STORE _ NAME ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Ranking DataStore ( data Store : ĠData Store < Preferences >): ĠRank ing DataStore Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRank ing DataStore ( data Store ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Theme DataStore ( data Store : ĠData Store < Preferences >): ĠTheme DataStore Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠTheme DataStore ( data Store ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Ranking Repository ( ĊĠĠĠĠĠĠĠ Ġservice : ĠWorld R ug by Service , ĊĠĠĠĠĠĠĠ Ġdao : ĠRank ing Dao , ĊĠĠĠĠĠĠĠ Ġdata Store : ĠRank ing DataStore ĊĠĠĠ Ġ): ĠRank ing Repository Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRank ing Repository ( service , Ġdao , Ġdata Store ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Prediction Repository ( dao : ĠRank ing Dao ): ĠPrediction Repository Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠPrediction Repository ( dao ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Match Repository ( ĊĠĠĠĠĠĠĠ Ġservice : ĠWorld R ug by Service , ĊĠĠĠĠĠĠĠ Ġdao : ĠRank ing Dao ĊĠĠĠ Ġ): ĠMatch Repository Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠMatch Repository ( service , Ġdao ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide News Repository ( service : ĠWorld R ug by Service ): ĠNews Repository Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠNews Repository ( service ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Theme Repository ( data Store : ĠTheme DataStore ): ĠTheme Repository Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠTheme Repository ( data Store ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Work Manager (@ ApplicationContext Ġcontext : ĠContext ): ĠWork Manager Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠWork Manager . getInstance ( context ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Ranking Work Manager ( work Manager : ĠWork Manager ): ĠRank ing Work Manager Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRank ing Work Manager ( work Manager ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Live Match Work Manager ( work Manager : ĠWork Manager ): ĠLive Match Work Manager Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠLive Match Work Manager ( work Manager ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠDATA _ STORE _ NAME Ġ= Ġ" r ug by _ rank er _ data _ store " ĊĠĠĠ Ġ} Ċ } Ċ