File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
src/main/java/com/example/sqlbasics Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1717plugins {
1818 id ' com.android.application'
1919 id ' kotlin-android'
20- id ' kotlin-kapt '
20+ id ' com.google.devtools.ksp '
2121}
2222
2323android {
@@ -53,8 +53,8 @@ dependencies {
5353 def room_version = ' 2.6.1'
5454
5555 implementation " androidx.room:room-runtime:$room_version "
56- kapt " androidx.room:room-compiler:$room_version "
57- // ksp("androidx.room:room-compiler:$room_version")
56+ // kapt "androidx.room:room-compiler:$room_version"
57+ ksp(" androidx.room:room-compiler:$room_version " )
5858
5959 // optional - Kotlin Extensions and Coroutines support for Room
6060 implementation " androidx.room:room-ktx:$room_version "
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ class MainActivity : AppCompatActivity() {
2424 override fun onCreate (savedInstanceState : Bundle ? ) {
2525 super .onCreate(savedInstanceState)
2626 setContentView(R .layout.activity_main)
27+ // Don't do this in a production app
2728 GlobalScope .launch {
2829 AppDatabase .getDatabase(applicationContext).californiaParkDao().getAll()
2930 }
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ buildscript {
3232
3333plugins {
3434 id ' org.jetbrains.kotlin.android' version ' 2.1.0' apply false
35+ id ' com.google.devtools.ksp' version ' 2.1.0-1.0.29' apply false
3536}
3637
3738allprojects {
You can’t perform that action at this time.
0 commit comments