From be858c6332b4f7b819bebf36f71d4e6c87839324 Mon Sep 17 00:00:00 2001 From: Pavel Shishkin Date: Mon, 25 Nov 2024 16:23:23 +0100 Subject: [PATCH] TODO asdf --- .../composable-test-cases/build.gradle.kts | 2 ++ .../composable-test-cases/gradle/libs.versions.toml | 2 +- .../composable-test-cases/settings.gradle.kts | 10 ++++++++++ .../lib/src/commonMain/kotlin/Dependencies.kt | 2 ++ .../valueClass/main/src/commonTest/kotlin/Tests.kt | 7 ++++--- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/compose/integrations/composable-test-cases/build.gradle.kts b/compose/integrations/composable-test-cases/build.gradle.kts index 09d1fc80f0..067c2639b6 100644 --- a/compose/integrations/composable-test-cases/build.gradle.kts +++ b/compose/integrations/composable-test-cases/build.gradle.kts @@ -120,3 +120,5 @@ fun KotlinSourceSet.libDependencyForMain1() { // if (project.name.endsWith("-main")) error("Unexpected main module name: ${project.name}") // return project(":" + project.name.replace("-main", "-lib")) //} + +println("kotlin version: ${libs.versions.kotlin.get()}") diff --git a/compose/integrations/composable-test-cases/gradle/libs.versions.toml b/compose/integrations/composable-test-cases/gradle/libs.versions.toml index 1bf8341294..5dbe462819 100644 --- a/compose/integrations/composable-test-cases/gradle/libs.versions.toml +++ b/compose/integrations/composable-test-cases/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin="2.1.0-RC" +kotlin="2.1.0-RC2-375" kotlinx-coroutines = "1.8.0" compose = "1.7.0" diff --git a/compose/integrations/composable-test-cases/settings.gradle.kts b/compose/integrations/composable-test-cases/settings.gradle.kts index 7c20e85989..7436bf505b 100644 --- a/compose/integrations/composable-test-cases/settings.gradle.kts +++ b/compose/integrations/composable-test-cases/settings.gradle.kts @@ -17,6 +17,16 @@ dependencyResolutionManagement { maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev") mavenLocal() } + + versionCatalogs { + register("libs").configure { + val kotlinVersion = providers.gradleProperty("kotlin_version").orNull + if (kotlinVersion != null) { + version("kotlin", kotlinVersion) +// println("kotlin version applied: $kotlinVersion") + } + } + } } fun module(name: String, path: String) { diff --git a/compose/integrations/composable-test-cases/testcases/valueClass/lib/src/commonMain/kotlin/Dependencies.kt b/compose/integrations/composable-test-cases/testcases/valueClass/lib/src/commonMain/kotlin/Dependencies.kt index a59662894c..3971ecf282 100644 --- a/compose/integrations/composable-test-cases/testcases/valueClass/lib/src/commonMain/kotlin/Dependencies.kt +++ b/compose/integrations/composable-test-cases/testcases/valueClass/lib/src/commonMain/kotlin/Dependencies.kt @@ -62,3 +62,5 @@ value class VCPrivateAllNonPrimitive private constructor(private val value: Stri val V2 = VCPrivateAllNonPrimitive("V2") } } + +data class DCCopyAvailable(val value: Int) diff --git a/compose/integrations/composable-test-cases/testcases/valueClass/main/src/commonTest/kotlin/Tests.kt b/compose/integrations/composable-test-cases/testcases/valueClass/main/src/commonTest/kotlin/Tests.kt index da66941897..5e0eb7c8e5 100644 --- a/compose/integrations/composable-test-cases/testcases/valueClass/main/src/commonTest/kotlin/Tests.kt +++ b/compose/integrations/composable-test-cases/testcases/valueClass/main/src/commonTest/kotlin/Tests.kt @@ -1,13 +1,10 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue -import com.example.common.TextContainerNode -import com.example.common.TextLeafNode import com.example.common.composeText import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.Job import kotlinx.coroutines.test.runTest -import kotlin.test.Ignore import kotlin.test.Test import kotlin.test.assertEquals @@ -190,4 +187,8 @@ class Tests { job.cancel() } + @Test + fun testDataClassCopyAvailable() = runTest { + val a = DCCopyAvailable(10).copy() + } }