Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.13 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.13 KB

Integrate Rooms Database Plugin in your application

Add Gradle Dependencies

Pluto Rooms Database is distributed through mavenCentral. To use it, you need to add the following Gradle dependency to your build.gradle file of you android app module.

Note: add the no-op variant to isolate the plugin from release builds.

dependencies {
  debugImplementation 'com.plutolib.plugins:rooms-db:2.0.1-beta'
  releaseImplementation 'com.plutolib.plugins:rooms-db-no-op:2.0.1-beta'
}

Install plugin to Pluto

Now to start using the plugin, add it to Pluto

Pluto.Installer(this)
  .addPlugin(PlutoRoomsDatabasePlugin("rooms-db"))
  .install()

Start watching Rooms Database

Create intance of DataStore Preferences and start watching in Pluto.

// DB_NAME should be same as database name assigned while creating the database.
PlutoRoomsDBWatcher.watch(DB_NAME, SampleDatabase::class.java)

🎉  You are all done!

Now re-build and run your app and open Pluto, you will see the Rooms Database plugin installed.