package Ġio . github . j wg ib ane z . contacts . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . room . Room Ċ 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 Ġio . github . j wg ib ane z . contacts . database . App Database Ċ import Ġio . github . j wg ib ane z . contacts . database . App Database . Companion . DB _ NAME Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Module Ċ @ Install In ( Singleton Component :: class ) Ċ object ĠDatabase Module Ġ{ ĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Database (@ ApplicationContext Ġapp Context : ĠContext ): ĠApp Database Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRoom . database Builder ( app Context , ĠApp Database :: class . java , ĠDB _ NAME ). build () ĊĠĠĠ Ġ} Ċ }