I recently saw the new feature announced on Google I/O Room Persistence Library to work with Sqlite databases on Android. I have been looking to the official documentation and I
Bouncing off @Thracian's answer, here's what I had to do while following this documentation:
https://codelabs.developers.google.com/codelabs/android-room-with-a-view-kotlin/#13
/* Room */
implementation 'androidx.room:room-runtime:2.1.0'
kapt 'androidx.room:room-runtime:2.1.0'
implementation 'androidx.room:room-compiler:2.1.0'
kapt 'androidx.room:room-compiler:2.1.0'
annotationProcessor 'androidx.room:room-compiler:2.1.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0-alpha02'
kapt 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0-alpha02'
implementation 'androidx.room:room-ktx:2.1.0'
kapt 'androidx.room:room-ktx:2.1.0'
implementation 'android.arch.lifecycle:extensions:1.1.1'
kapt 'android.arch.lifecycle:extensions:1.1.1'
Also within android {}
I had to add:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Despite what I've read, with Kotlin you still must use annotationProcessor