Skip to content

Commit

Permalink
Update Kotlin and Compose in composable-test-cases (#4046)
Browse files Browse the repository at this point in the history
Co-authored-by: Oleksandr.Karpovich <[email protected]>
  • Loading branch information
eymar and Oleksandr.Karpovich authored Dec 18, 2023
1 parent 382c6a3 commit cf8c9eb
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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()
Expand Down Expand Up @@ -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")
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 5 additions & 3 deletions compose/integrations/composable-test-cases/gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[versions]
kotlinx-datetime = "0.5.0"

[libraries]
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit cf8c9eb

Please sign in to comment.