File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
src/main/java/com/example/sqlbasics Expand file tree Collapse file tree 3 files changed +8
-6
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,13 +53,13 @@ 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 "
6161
62- implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 '
62+ implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0 '
6363 implementation ' androidx.core:core-ktx:1.15.0'
6464 implementation ' androidx.appcompat:appcompat:1.7.0'
6565 implementation ' com.google.android.material:material:1.12.0'
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 1616
1717// Top-level build file where you can add configuration options common to all sub-projects/modules.
1818buildscript {
19- ext. kotlin_version = " 1.7.10 "
19+ ext. kotlin_version = " 2.1.0 "
2020 repositories {
2121 google()
2222 mavenCentral()
@@ -31,7 +31,8 @@ buildscript {
3131}
3232
3333plugins {
34- id ' org.jetbrains.kotlin.android' version ' 1.9.21' apply false
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
3536}
3637
3738allprojects {
You can’t perform that action at this time.
0 commit comments