package Ġcom . example . de lo it te _ flickr _ search . depend ancies Ċ Ċ import Ġcom . example . de lo it te _ flickr _ search . networking . F lickr Api Ċ import Ġcom . example . de lo it te _ flickr _ search . networking . util . Constants Ċ 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 . adapter . rx java 2 . Rx Java 2 Call Adapter Factory Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ @ Install In ( Singleton Component :: class ) Ċ object ĠNetwork Module { ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide BaseUrl () Ġ= ĠConstants . BASE _ URL ĊĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide F lickr Api (): ĠF lickr Api Ġ= Ġ ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠ Ġ. baseUrl ( Constants . BASE _ URL ) ĊĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ()) ĊĠĠĠĠĠĠĠ Ġ. add Call Adapter Factory ( Rx Java 2 Call Adapter Factory . create ()) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġ. create ( F lickr Api :: class . java ) ĊĊ Ċ }