Skip to content

Commit

Permalink
04_01e
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgassner committed Jul 20, 2020
1 parent 7faa83a commit b9ba7b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
}

android {
Expand Down Expand Up @@ -49,6 +50,10 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
implementation "androidx.recyclerview:recyclerview:1.1.0"
def room_version = "2.2.5"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-compiler-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package com.example.plainolnotes4.data

import androidx.room.Entity
import androidx.room.PrimaryKey
import com.example.plainolnotes4.NEW_NOTE_ID
import java.util.*

@Entity(tableName = "notes")
data class NoteEntity(
@PrimaryKey(autoGenerate = true)
var id: Int,
var date: Date,
var text: String
Expand Down

0 comments on commit b9ba7b9

Please sign in to comment.