package Ġcom . s achin . we at he ar . base Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroidx . room . Room Ċ import Ġcom . s achin . we at he ar . database . App Database Ċ import Ġcom . s achin . we at he ar . di . App Component Ċ import Ġcom . s achin . we at he ar . di . D agger App Component Ċ import Ġcom . s achin . we at he ar . di . module . App Module Ċ import Ġcom . s achin . we at he ar . di . module . Net Work Module Ċ Ċ class ĠMy Application : Application () Ġ{ ĊĊĠĠĠ Ġopen Ġlateinit Ġvar Ġapp Component : ĠApp Component ĊĊĠĠĠ Ġcompanion Ġobject { ĊĠĠĠĠĠĠĠ Ġlateinit Ġvar Ġapplication : ĠMy Application ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate () ĊĊĠĠĠĠĠĠĠ Ġapplication Ġ= Ġthis ĊĊĠĠĠĠĠĠĠ Ġapp Component Ġ= ĠD agger App Component . builder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. net Work module ( Net Work Module ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. app Module ( App Module ( application , ĠRoom . database Builder ( this , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠApp Database :: class . java , Ġ" MV VM _ DEMO ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. allow MainThread Queries (). build ())). build () ĊĊĠĠĠĠĠĠĠ Ġapp Component . inject ( this ) ĊĊĠĠĠ Ġ} Ċ }