package Ġcom . abs int he . lib checker . api Ċ Ċ import Ġcom . abs int he . lib checker . api . request . VERSION Ċ import Ġcom . abs int he . lib checker . constant . Constants Ċ import Ġcom . abs int he . lib checker . constant . Global Values Ċ import Ġokhttp 3 . Ok HttpClient Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory Ċ import Ġjava . util . concurrent . TimeUnit Ċ Ċ private Ġconst Ġval ĠB RANCH _ MASTER Ġ= Ġ" master " Ċ private Ġconst Ġval ĠWORK ING _ BRANCH Ġ= ĠB RANCH _ MASTER Ċ Ċ object ĠApi Manager Ġ{ ĊĊĠ Ġprivate Ġconst Ġval ĠG ITHUB _ ROOT _ URL Ġ= ĊĠĠĠ Ġ" https :// raw . githubusercontent . com / zh ao bo zh en / Lib Checker - Rules /$ WORK ING _ BRANCH /" ĊĠ Ġprivate Ġconst Ġval ĠG ITE E _ ROOT _ URL Ġ= ĊĠĠĠ Ġ" https :// g itee . com / zh ao bo zh en / Lib Checker - Rules / raw /$ WORK ING _ BRANCH /" ĊĊĠ Ġconst Ġval ĠG ITHUB _ NEW _ ISSUE _ URL Ġ= ĊĠĠĠ Ġ" https :// github . com / zh ao bo zh en / Lib Checker - Rules / issues / new ? labels =& template = library - name . md & title =% 5 B New + Rule % 5 D " ĊĊĠ Ġprivate Ġval Ġroot ĊĠĠĠ Ġget () Ġ= Ġwhen Ġ( Global Values . repo ) Ġ{ ĊĠĠĠĠĠ ĠConstants . REPO _ GITHUB Ġ-> ĠG ITHUB _ ROOT _ URL ĊĠĠĠĠĠ ĠConstants . REPO _ G ITE E Ġ-> ĠG ITE E _ ROOT _ URL ĊĠĠĠĠĠ Ġelse Ġ-> ĠG ITHUB _ ROOT _ URL ĊĠĠĠ Ġ} ĊĊĠ Ġval Ġrules Bundle Url Ġ= Ġ"${ root } cloud / rules / v $ VERSION / rules . db " ĊĊĠ Ġprivate Ġval Ġretrofit Ġby Ġlazy Ġ{ ĊĠĠĠ Ġval Ġokhttp Builder Ġ= ĠOk HttpClient . Builder () ĊĠĠĠĠĠ Ġ. connect Timeout ( 3 0 , ĠTimeUnit . SECONDS ) ĊĠĠĠĠĠ Ġ. read Timeout ( 3 0 , ĠTimeUnit . SECONDS ) ĊĠĠĠĠĠ Ġ. write Timeout ( 3 0 , ĠTimeUnit . SECONDS ) ĊĠĠĠ ĠRet rofit . Builder () ĊĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ()) ĊĠĠĠĠĠ Ġ. client ( okhttp Builder . build ()) ĊĠĠĠĠĠ Ġ. baseUrl ( root ) ĊĠĠĠĠĠ Ġ. build () ĊĠ Ġ} ĊĊĠ Ġfun Ġ< T > Ġcreate ( service : ĠClass < T >): ĠT Ġ= Ġretrofit . create ( service ) ĊĊĠ Ġinline Ġfun Ġ< re ified ĠT > Ġcreate (): ĠT Ġ= Ġcreate ( T :: class . java ) Ċ } Ċ