Browse Source

Update web components to kotlin 1.5 and the new version of Compose Core (with kotlin 1.5)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
pull/690/head
Shagen Ogandzhanian 4 years ago
parent
commit
4aa25306a4
  1. 2
      web/build.gradle.kts
  2. 4
      web/gradle.properties
  3. 8
      web/integration/src/jsMain/kotlin/androidx/compose/web/sample/tests/Common.kt

2
web/build.gradle.kts

@ -1,7 +1,7 @@
import org.gradle.api.publish.PublishingExtension import org.gradle.api.publish.PublishingExtension
plugins { 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 val COMPOSE_WEB_VERSION: String by project

4
web/gradle.properties

@ -1,2 +1,2 @@
COMPOSE_CORE_VERSION = 0.0.8-SNAPSHOT COMPOSE_CORE_VERSION = 0.0.10-SNAPSHOT
COMPOSE_WEB_VERSION = 0.0.9-SNAPSHOT COMPOSE_WEB_VERSION = 0.0.10-SNAPSHOT

8
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.properties.ReadOnlyProperty
import kotlin.reflect.KProperty import kotlin.reflect.KProperty
internal class TestCase(val composable: @Composable () -> Unit) { internal class TestCase {
lateinit var composable: @Composable () -> Unit
operator fun provideDelegate( operator fun provideDelegate(
thisRef: Any, thisRef: Any,
property: KProperty<*> property: KProperty<*>
@ -21,7 +23,9 @@ internal class TestCase(val composable: @Composable () -> Unit) {
} }
internal fun testCase(composable: @Composable () -> Unit): TestCase { internal fun testCase(composable: @Composable () -> Unit): TestCase {
return TestCase(composable) return TestCase().apply {
this.composable = composable
}
} }
internal val testCases = mutableMapOf<String, TestCase>() internal val testCases = mutableMapOf<String, TestCase>()

Loading…
Cancel
Save