package Ġcom . re curve . sample . util Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroidx . room . Room Ċ import Ġcom . re curve . ret rofit 2 . LiveData Call Adapter Factory Ċ import Ġcom . re curve . sample . ret rofit . api . Github Service Ċ import Ġcom . re curve . sample . ret rofit . db . Github Db Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory Ċ Ċ fun Ġcreate Db ( app : ĠApplication ) Ġ: ĠGithub Db Ġ{ ĊĠĠĠ Ġreturn ĠRoom . database Builder ( app , ĠGithub Db :: class . java , Ġ" github . db ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. fallback To Dest ruct ive Migration () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () Ċ } Ċ Ċ fun Ġcreate Github Service () Ġ: ĠGithub Service Ġ{ ĊĠĠĠ Ġreturn ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl (" https :// api . github . com /") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Call Adapter Factory ( LiveData Call Adapter Factory ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. create ( Github Service :: class . java ) Ċ }