An open API service indexing awesome lists of open source software.

https://github.com/blundell/debugroomdaos

how to create Room DAOs specifically for your Android debug build. These debug-only DAOs enable you to implement developer-centric features without affecting your production app.
https://github.com/blundell/debugroomdaos

androiddev developertools jetpack-room

Last synced: 3 months ago
JSON representation

how to create Room DAOs specifically for your Android debug build. These debug-only DAOs enable you to implement developer-centric features without affecting your production app.

Awesome Lists containing this project

README

          

# Example of creating Debug DAO's

A debug DAO is a room DAO that is only available in the debug sourceset.

https://blog.blundellapps.co.uk/room-debug-daos-in-android-streamlining-your-workflow/

This allows you to separate database actions that are used for debugging & developer tools from database actions that are required for user
facing features.

Taking influence from the official example code:

- https://developer.android.com/codelabs/basic-android-kotlin-compose-persisting-data-room#0
- https://github.com/google-developer-training/basic-android-kotlin-compose-training-inventory-app

And then augmenting with:

```
app/src/debug/java/com/blundell/tut/daoshop/DaoExtensions.kt
app/src/debug/java/com/blundell/tut/daoshop/DebugItemDao.kt
```

&

```
app/src/release/java/com/blundell/tut/daoshop/DaoExtensions.kt
```

![](/sourcesets.png)