Android Jetpack

ROOM + Coroutine Flow - 4 (Why Room & Coroutine - 2)

----___<<<<< 2023. 1. 28. 05:09

Flow를 이용해서 데이터 변화를 감지해보겠습니다.

 

 

id 'kotlin-kapt'
// ROOM
def roomVersion = "2.5.0"

implementation("androidx.room:room-runtime:$roomVersion")
annotationProcessor("androidx.room:room-compiler:$roomVersion")

// To use Kotlin annotation processing tool (kapt)
kapt("androidx.room:room-compiler:$roomVersion")

// Coroutine
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")

// Coroutine + Room
implementation("androidx.room:room-ktx:$roomVersion")