From ea57cf0e4d32eec128640a970d0bfbd2b0b18af3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:17:56 +0000 Subject: [PATCH 1/2] Update kotlin --- app/build.gradle | 2 +- build.gradle | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ce6f265..a6b2b42 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -59,7 +59,7 @@ dependencies { // optional - Kotlin Extensions and Coroutines support for Room implementation "androidx.room:room-ktx:$room_version" - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0' implementation 'androidx.core:core-ktx:1.15.0' implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'com.google.android.material:material:1.12.0' diff --git a/build.gradle b/build.gradle index 4798813..4552118 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.7.10" + ext.kotlin_version = "2.1.0" repositories { google() mavenCentral() @@ -31,7 +31,7 @@ buildscript { } plugins { - id 'org.jetbrains.kotlin.android' version '1.9.21' apply false + id 'org.jetbrains.kotlin.android' version '2.1.0' apply false } allprojects { From 680d83ced82bf3e18d4674fd1b61a178311997f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Alc=C3=A9rreca?= Date: Mon, 9 Dec 2024 15:34:46 +0000 Subject: [PATCH 2/2] Trying to fix build --- app/build.gradle | 6 +++--- app/src/main/java/com/example/sqlbasics/MainActivity.kt | 1 + build.gradle | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a6b2b42..121f14e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,7 +17,7 @@ plugins { id 'com.android.application' id 'kotlin-android' - id 'kotlin-kapt' + id 'com.google.devtools.ksp' } android { @@ -53,8 +53,8 @@ dependencies { def room_version = '2.6.1' implementation "androidx.room:room-runtime:$room_version" - kapt "androidx.room:room-compiler:$room_version" - //ksp("androidx.room:room-compiler:$room_version") + //kapt "androidx.room:room-compiler:$room_version" + ksp("androidx.room:room-compiler:$room_version") // optional - Kotlin Extensions and Coroutines support for Room implementation "androidx.room:room-ktx:$room_version" diff --git a/app/src/main/java/com/example/sqlbasics/MainActivity.kt b/app/src/main/java/com/example/sqlbasics/MainActivity.kt index 398fce5..0b5c07f 100644 --- a/app/src/main/java/com/example/sqlbasics/MainActivity.kt +++ b/app/src/main/java/com/example/sqlbasics/MainActivity.kt @@ -24,6 +24,7 @@ class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) + // Don't do this in a production app GlobalScope.launch { AppDatabase.getDatabase(applicationContext).californiaParkDao().getAll() } diff --git a/build.gradle b/build.gradle index 4552118..af28638 100644 --- a/build.gradle +++ b/build.gradle @@ -32,6 +32,7 @@ buildscript { plugins { id 'org.jetbrains.kotlin.android' version '2.1.0' apply false + id 'com.google.devtools.ksp' version '2.1.0-1.0.29' apply false } allprojects {