Persisting data in a local database
We'll be using SQLDelight (https://github.com/cashapp/sqldelight) for Dogify, though there are other possibilities including NoSQL solutions as well, such as Realm (https://github.com/realm/realm-kotlin) and Kodein-DB (https://github.com/Kodein-Framework/Kodein-DB).
In this section, we're going to do the following:
- Explore how to set up SQLDelight in a multiplatform module.
- Implement the
- Connect the remaining API functionality to our database.
Let's dive in.
Exploring how to set up SQLDelight in a multiplatform module
- Add the plugin to the
classpath("com.squareup.sqldelight:gradle-plugin:$sqlDelightVersion")to the top-level
- Apply the plugin to our shared module, by adding