From 08fafcfcedca19bcf0f75864f842de2edc1c2a83 Mon Sep 17 00:00:00 2001 From: r-ca Date: Thu, 14 Dec 2023 03:32:02 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=90=E3=82=A4=E3=83=80?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/database/LacertaDatabaseModule.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/database/LacertaDatabaseModule.java b/source/src/main/java/one/nem/lacerta/source/database/LacertaDatabaseModule.java index 7a15ef16..2a6577d7 100644 --- a/source/src/main/java/one/nem/lacerta/source/database/LacertaDatabaseModule.java +++ b/source/src/main/java/one/nem/lacerta/source/database/LacertaDatabaseModule.java @@ -1,8 +1,13 @@ package one.nem.lacerta.source.database; +import android.content.Context; + +import androidx.room.Room; + import dagger.Module; import dagger.Provides; import dagger.hilt.InstallIn; +import dagger.hilt.android.qualifiers.ApplicationContext; import dagger.hilt.components.SingletonComponent; @Module @@ -10,7 +15,9 @@ import dagger.hilt.components.SingletonComponent; public class LacertaDatabaseModule { @Provides - public LacertaDatabase provideLacertaDatabase() { - return null; + public LacertaDatabase provideLacertaDatabase(@ApplicationContext Context context) { + return Room.databaseBuilder(context, + LacertaDatabase.class, + "lacerta.db").build(); } }