Skip to content

Commit 3f150f0

Browse files
Merge pull request #78 from google-developer-training/renovate/main-kotlin
Update kotlin (main)
2 parents 605bcf1 + 680d83c commit 3f150f0

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
plugins {
1818
id 'com.android.application'
1919
id 'kotlin-android'
20-
id 'kotlin-kapt'
20+
id 'com.google.devtools.ksp'
2121
}
2222

2323
android {
@@ -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'

app/src/main/java/com/example/sqlbasics/MainActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
}

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1818
buildscript {
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

3333
plugins {
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

3738
allprojects {

0 commit comments

Comments
 (0)