This is a very basic example that shows how to use ObjectBox in multiple modules of an Android app written in Kotlin.
There are two feature modules and a main app module depending on them. Each feature module has a repository class wrapping an ObjectBox database:
The app module only interacts with the repository API and does not see how the data is actually stored.
You can see how to
- write and annotate classes to make them Entities (Note.kt, Task.kt),
- create a Store with a unique name and use it (NotesRepository.kt, TasksRepository.kt),
- write unit tests that run on your machine (NotesAndTasksTest.kt).