diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 41788128c7..b5accc5d9d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -6,6 +6,7 @@ plugins { alias(libs.plugins.jetbrains.kotlin.android) alias(libs.plugins.kotlin.kapt) alias(libs.plugins.kotlin.parcelize) + alias(libs.plugins.compose.compiler) } apply(from = "$rootDir/jacoco.gradle") @@ -182,9 +183,6 @@ android { compose = true } buildToolsVersion = buildToolsVersion - composeOptions { - kotlinCompilerExtensionVersion = "1.5.8" - } packaging { jniLibs { excludes += listOf("META-INF/androidx.*") diff --git a/build.gradle.kts b/build.gradle.kts index d3860805eb..1b04b3a62d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,7 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.jetbrains.kotlin.android) apply false + alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.github.triplet.play) apply false alias(libs.plugins.getkeepsafe.dexcount) } diff --git a/gradle.properties b/gradle.properties index 61c3584e58..2f23134b35 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,3 +24,6 @@ android.enableJetifier=true android.jetifier.ignorelist=bcprov-jdk15on android.nonTransitiveRClass=false android.nonFinalResIds=false + +# Enable K2 mode for KAPT (required for Kotlin 2.0+) +kapt.use.k2=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9a4dd53cb2..f9ae80547b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -33,7 +33,7 @@ glide = "4.12.0" gson = "2.8.5" junit = "4.13.2" junitJupiter = "5.10.0" -kotlin = "1.9.22" +kotlin = "2.1.0" kotlinStdlib = "1.8.0" coroutines = "1.7.3" leakcanary = "2.10" @@ -58,7 +58,7 @@ recyclerview = "1.2.0-alpha02" recyclerviewFastscroll = "2.0.1" retrofit = "2.8.1" robolectric = "4.14.1" -room = "2.6.1" +room = "2.7.0" rules = "1.5.0" runner = "1.5.2" rxandroid = "2.1.0" @@ -208,5 +208,6 @@ android-application = { id = "com.android.application", version.ref = "agp" } jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-kapt = { id = "org.jetbrains.kotlin.kapt" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } github-triplet-play = { id = "com.github.triplet.play", version.ref = "githubTripletPlay" } getkeepsafe-dexcount = { id = "com.getkeepsafe.dexcount", version.ref = "dexcount" } \ No newline at end of file