From 4aa25306a4f6ce932591cd6443d76fd39b121f45 Mon Sep 17 00:00:00 2001 From: Shagen Ogandzhanian Date: Mon, 24 May 2021 11:20:11 +0200 Subject: [PATCH] Update web components to kotlin 1.5 and the new version of Compose Core (with kotlin 1.5) Co-authored-by: Oleksandr Karpovich --- web/build.gradle.kts | 2 +- web/gradle.properties | 4 ++-- .../kotlin/androidx/compose/web/sample/tests/Common.kt | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/web/build.gradle.kts b/web/build.gradle.kts index c648ad1278..b92eaf9862 100644 --- a/web/build.gradle.kts +++ b/web/build.gradle.kts @@ -1,7 +1,7 @@ import org.gradle.api.publish.PublishingExtension plugins { - id("org.jetbrains.kotlin.multiplatform") version("1.4.32") apply(false) + id("org.jetbrains.kotlin.multiplatform") version("1.5.0") apply(false) } val COMPOSE_WEB_VERSION: String by project diff --git a/web/gradle.properties b/web/gradle.properties index 13bf8bf632..9d06a6d47c 100644 --- a/web/gradle.properties +++ b/web/gradle.properties @@ -1,2 +1,2 @@ -COMPOSE_CORE_VERSION = 0.0.8-SNAPSHOT -COMPOSE_WEB_VERSION = 0.0.9-SNAPSHOT +COMPOSE_CORE_VERSION = 0.0.10-SNAPSHOT +COMPOSE_WEB_VERSION = 0.0.10-SNAPSHOT diff --git a/web/integration/src/jsMain/kotlin/androidx/compose/web/sample/tests/Common.kt b/web/integration/src/jsMain/kotlin/androidx/compose/web/sample/tests/Common.kt index 1b38fb3350..0d15f76a88 100644 --- a/web/integration/src/jsMain/kotlin/androidx/compose/web/sample/tests/Common.kt +++ b/web/integration/src/jsMain/kotlin/androidx/compose/web/sample/tests/Common.kt @@ -7,7 +7,9 @@ import androidx.compose.web.renderComposableInBody import kotlin.properties.ReadOnlyProperty import kotlin.reflect.KProperty -internal class TestCase(val composable: @Composable () -> Unit) { +internal class TestCase { + lateinit var composable: @Composable () -> Unit + operator fun provideDelegate( thisRef: Any, property: KProperty<*> @@ -21,7 +23,9 @@ internal class TestCase(val composable: @Composable () -> Unit) { } internal fun testCase(composable: @Composable () -> Unit): TestCase { - return TestCase(composable) + return TestCase().apply { + this.composable = composable + } } internal val testCases = mutableMapOf()