Browse Source

Update Kotlin and Compose in composable-test-cases (#4046)

Co-authored-by: Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
pull/4048/head v1.6.0-dev1340
Oleksandr Karpovich 1 year ago committed by GitHub
parent
commit
cf8c9eb075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      compose/integrations/composable-test-cases/buildSrc/src/main/kotlin/TargetsConfiguration.kt
  2. 4
      compose/integrations/composable-test-cases/common/build.gradle.kts
  3. 8
      compose/integrations/composable-test-cases/gradle.properties
  4. 5
      compose/integrations/composable-test-cases/gradle/libs.versions.toml
  5. 9
      compose/integrations/composable-test-cases/testcases/expectActual/lib/build.gradle.kts

19
compose/integrations/composable-test-cases/buildSrc/src/main/kotlin/TargetsConfiguration.kt

@ -7,6 +7,13 @@ import org.jetbrains.kotlin.gradle.kpm.external.project
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetContainer
import org.jetbrains.kotlin.gradle.plugin.extraProperties
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
val Project.coroutinesVersion: String
get() {
return extraProperties.properties["kotlinx.coroutines.version"] as String
}
val Project.isInIdea: Boolean
get() {
@ -19,7 +26,7 @@ val Project.isFailingJsCase: Boolean
val Project.isMingwX64Enabled: Boolean
get() = this.isInIdea
@OptIn(ExternalVariantApi::class)
@OptIn(ExternalVariantApi::class, ExperimentalWasmDsl::class)
fun KotlinMultiplatformExtension.configureTargets() {
jvm("desktop")
configureJsTargets()
@ -53,8 +60,10 @@ fun KotlinDependencyHandler.getCommonLib(): ProjectDependency {
}
fun KotlinSourceSet.configureCommonTestDependencies() {
dependencies {
implementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4")
with(project) {
dependencies {
implementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesVersion")
}
}
}
}

4
compose/integrations/composable-test-cases/common/build.gradle.kts

@ -13,8 +13,8 @@ kotlin {
val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
implementation(libs.kotlinx.datetime)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
}
}
val commonTest by getting {

8
compose/integrations/composable-test-cases/gradle.properties

@ -1,12 +1,14 @@
org.gradle.jvmargs=-Xmx2048M -XX:MaxMetaspaceSize=512m
kotlin.code.style=official
android.useAndroidX=true
kotlin.version=1.9.20
kotlin.version=1.9.21
agp.version=7.3.0
compose.version=1.5.10
compose.version=1.6.0-dev1334
kotlinx.coroutines.version=1.8.0-RC
#empty by default - a default version will be used
#compose.kotlinCompilerPluginVersion=23.11.20
#compose.kotlinCompilerPluginVersion=23.12.18
compose.kotlinCompilerPluginVersion=1.5.3
# default|failingJs - see enum class CasesToRun

5
compose/integrations/composable-test-cases/gradle/libs.versions.toml

@ -0,0 +1,5 @@
[versions]
kotlinx-datetime = "0.5.0"
[libraries]
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }

9
compose/integrations/composable-test-cases/testcases/expectActual/lib/build.gradle.kts

@ -23,6 +23,15 @@ kotlin {
val iosMain by getting {
dependsOn(nativeMain)
}
val iosX64Main by getting {
dependsOn(iosMain)
}
val iosArm64Main by getting {
dependsOn(iosMain)
}
val iosSimulatorArm64Main by getting {
dependsOn(iosMain)
}
val linuxX64Main by getting {
dependsOn(nativeMain)
}

Loading…
Cancel
Save