package Ġcom . sek th d roid . mar vel . data . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . room . Room Ċ import Ġcom . sek th d roid . mar vel . data . room . Characters Dao Ċ import Ġcom . sek th d roid . mar vel . data . room . Mar vel 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 Ġclass ĠDatabase Module Ġ{ ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġcharacters Dao ( mar vel Database : ĠMar vel Database ): ĠChar acters Dao Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġmar vel Database . characters Dao () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Singleton ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġroom (@ ApplicationContext Ġapp Context : ĠContext ): ĠMar vel Database Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRoom . database Builder ( app Context , ĠMar vel Database :: class . java , Ġ" mar vel - characters ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġ} Ċ }