sbt-android-room


License

License

GroupId

GroupId

com.lucidchart
ArtifactId

ArtifactId

sbt-android-room_2.10
Last Version

Last Version

0.0.16
Release Date

Release Date

Type

Type

jar
Description

Description

sbt-android-room
sbt-android-room
Project URL

Project URL

https://github.com/lucidsoftware/sbt-android-room
Project Organization

Project Organization

com.lucidchart
Source Code Management

Source Code Management

https://github.com/lucidsoftware/sbt-android-room

Download sbt-android-room_2.10

How to add to project

<!-- https://jarcasting.com/artifacts/com.lucidchart/sbt-android-room_2.10/ -->
<dependency>
    <groupId>com.lucidchart</groupId>
    <artifactId>sbt-android-room_2.10</artifactId>
    <version>0.0.16</version>
</dependency>
// https://jarcasting.com/artifacts/com.lucidchart/sbt-android-room_2.10/
implementation 'com.lucidchart:sbt-android-room_2.10:0.0.16'
// https://jarcasting.com/artifacts/com.lucidchart/sbt-android-room_2.10/
implementation ("com.lucidchart:sbt-android-room_2.10:0.0.16")
'com.lucidchart:sbt-android-room_2.10:jar:0.0.16'
<dependency org="com.lucidchart" name="sbt-android-room_2.10" rev="0.0.16">
  <artifact name="sbt-android-room_2.10" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.lucidchart', module='sbt-android-room_2.10', version='0.0.16')
)
libraryDependencies += "com.lucidchart" % "sbt-android-room_2.10" % "0.0.16"
[com.lucidchart/sbt-android-room_2.10 "0.0.16"]

Dependencies

compile (1)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.10.6

Project Modules

There are no modules declared in this project.

sbt-android-room

Build Status

This is work in progress. Key functionality is likely still missing. Although using it with the Room Persistence Library documentation seems to work well. The Lucidchart app is using it successfully in production.

In your project:

# project/plugins.sbt
addSbtPlugin("com.lucidchart" % "sbt-android-room" % "0.0.12")

# build.sbt
libraryDependencies += "com.lucidchart" %% "android-room" % "0.0.12"
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
enablePlugins(AndroidApp, RoomPlugin)

The Room Persistence Library documentation explains usage. There are a few caveats you should be aware of:

@Entity()

You must use the @RoomEntity annotation provided by android-room instead of @Entity (or you will have to create your own setters):

@RoomEntity()
case class Thing(@PrimaryKey id: Int, name: String)

@Query()

You should use the @RoomQuery annotation provided by android-room instead of @Query. It works the same as @Query

If you opt to go ahead and use @Query directly, when you reference interpolated parameters, instead of referencing them by name, you have to reference them by arg0, arg1, etc.

@Dao
abstract class ThingDao {

  @RoomQuery("SELECT * FROM Thing WHERE id = :id AND name = :name")
  def find(id: Int, name: String)

  @Query("SELECT * FROM Thing WHERE id = :arg0 AND name = :arg1")
  def find(id: Int, name: String)

}
com.lucidchart

Lucid Software, Inc

Versions

Version
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0