package Ġcom . r ak ib studio . news app mv vm . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . room . Room Ċ import Ġcom . r ak ib studio . news app mv vm . db . Article Database Ċ import Ġcom . r ak ib studio . news app mv vm . util . Constant . Companion . NE WS _ DATABASE _ NAME Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . android . components . Application Component Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġjavax . inject . Singleton ĊĊ Ċ @ Module Ċ @ Install In ( Application Component :: class ) Ċ object ĠDatabase Module Ġ{ ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Article Database ( ĊĠĠĠĠĠĠĠ Ġ@ ApplicationContext Ġapp : ĠContext ĊĠĠĠ Ġ) Ġ= ĠRoom . database Builder ( ĊĠĠĠĠĠĠĠ Ġapp , ĊĠĠĠĠĠĠĠ ĠArticle Database :: class . java , ĊĠĠĠĠĠĠĠ ĠNE WS _ DATABASE _ NAME ĊĠĠĠ Ġ). build () ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Article Dao ( db : ĠArticle Database ) Ġ= Ġdb . get Article Dao () Ċ }