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 17
17
plugins {
18
18
id ' com.android.application'
19
19
id ' kotlin-android'
20
- id ' kotlin-kapt '
20
+ id ' com.google.devtools.ksp '
21
21
}
22
22
23
23
android {
@@ -53,8 +53,8 @@ dependencies {
53
53
def room_version = ' 2.6.1'
54
54
55
55
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 " )
58
58
59
59
// optional - Kotlin Extensions and Coroutines support for Room
60
60
implementation " androidx.room:room-ktx:$room_version "
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ class MainActivity : AppCompatActivity() {
24
24
override fun onCreate (savedInstanceState : Bundle ? ) {
25
25
super .onCreate(savedInstanceState)
26
26
setContentView(R .layout.activity_main)
27
+ // Don't do this in a production app
27
28
GlobalScope .launch {
28
29
AppDatabase .getDatabase(applicationContext).californiaParkDao().getAll()
29
30
}
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ buildscript {
32
32
33
33
plugins {
34
34
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
35
36
}
36
37
37
38
allprojects {
You can’t perform that action at this time.
0 commit comments