package Ġcom . third w avel ist . co fici ando . core . di . modules Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . room . Room Ċ import Ġcom . third w avel ist . co fici ando . core . data . db . C afe Dao Ċ import Ġcom . third w avel ist . co fici ando . core . data . db . Database Ċ 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 Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ @ Install In ( Singleton Component :: class ) Ċ internal Ġobject ĠStorage Module Ġ{ ĊĠĠĠ Ġprivate Ġconst Ġval ĠDB _ NAME Ġ= Ġ" app - database . db " ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide Database (@ ApplicationContext Ġcontext : ĠContext ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRoom . database Builder ( context , ĠDatabase :: class . java , ĠDB _ NAME ). build () ĊĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġfun Ġprovide C afe Dao ( database : ĠDatabase ): ĠC afe Dao Ġ= Ġdatabase . ca fe Dao () Ċ }