From 52a0ad485642cfb38d93d8a6086d8634934c1124 Mon Sep 17 00:00:00 2001 From: Mario Bodemann Date: Fri, 12 Jul 2024 23:09:14 +0200 Subject: [PATCH] Update kotlin to 2.0.0 closes #383 --- zeapp/android/build.gradle.kts | 1 + zeapp/build.gradle.kts | 1 + zeapp/desktop/build.gradle.kts | 8 +++++--- zeapp/gradle/libs.versions.toml | 5 +++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/zeapp/android/build.gradle.kts b/zeapp/android/build.gradle.kts index 3d4f56a4..edfecd5f 100644 --- a/zeapp/android/build.gradle.kts +++ b/zeapp/android/build.gradle.kts @@ -3,6 +3,7 @@ import org.jlleitschuh.gradle.ktlint.reporter.ReporterType plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) + alias(libs.plugins.jetbrains.compose.compiler) alias(libs.plugins.ktlint.gradle) alias(libs.plugins.detekt.gradle) alias(libs.plugins.dagger.hilt) diff --git a/zeapp/build.gradle.kts b/zeapp/build.gradle.kts index 43ea04bd..b55d73b0 100644 --- a/zeapp/build.gradle.kts +++ b/zeapp/build.gradle.kts @@ -4,6 +4,7 @@ plugins { alias(libs.plugins.android.library) apply false alias(libs.plugins.android.test) apply false alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.jetbrains.compose.compiler) apply false alias(libs.plugins.kotlin.multiplatform) apply false alias(libs.plugins.ksp) apply false alias(libs.plugins.kotlin.serialization) apply false diff --git a/zeapp/desktop/build.gradle.kts b/zeapp/desktop/build.gradle.kts index 22d01d2a..1e61df1a 100644 --- a/zeapp/desktop/build.gradle.kts +++ b/zeapp/desktop/build.gradle.kts @@ -3,6 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { kotlin("jvm") + alias(libs.plugins.jetbrains.compose.compiler) alias(libs.plugins.jetbrains.compose) alias(libs.plugins.kotlin.serialization) alias(libs.plugins.roborazzi) @@ -49,8 +50,9 @@ roborazzi { outputDir.set(project.layout.projectDirectory.dir("src/snapshots/roborazzi/images")) } -tasks.withType().configureEach { - kotlinOptions { - freeCompilerArgs += "-Xcontext-receivers" +kotlin{ + compilerOptions { + freeCompilerArgs.add("-Xcontext-receivers") + freeCompilerArgs.add("-Xexpect-actual-classes") } } diff --git a/zeapp/gradle/libs.versions.toml b/zeapp/gradle/libs.versions.toml index a6c2fff0..f00baf85 100644 --- a/zeapp/gradle/libs.versions.toml +++ b/zeapp/gradle/libs.versions.toml @@ -20,10 +20,10 @@ coil = "2.6.0" dagger-hilt = "2.51.1" detekt-gradle = "1.23.6" jSerialComm = "2.11.0" -kotlin = "1.9.24" +kotlin = "2.0.0" kotlinx-coroutines-core = "1.8.1" kotlinxSerializationJson = "1.6.3" -ksp = "1.9.24-1.0.20" +ksp = "2.0.0-1.0.22" ktlint-gradle = "12.1.1" material3-wsc = "1.2.1" mik3y-usb-serial = "3.7.0" @@ -54,6 +54,7 @@ ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } ktlint-gradle = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint-gradle" } aboutlibraries-gradle = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutlibraries" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +jetbrains-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose" } roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" }