diff --git a/buildSrc/src/main/kotlin/mordant-native-conventions.gradle.kts b/buildSrc/src/main/kotlin/mordant-native-conventions.gradle.kts index 3407eacf6..44bf8aeef 100644 --- a/buildSrc/src/main/kotlin/mordant-native-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/mordant-native-conventions.gradle.kts @@ -10,6 +10,5 @@ kotlin { tvosSimulatorArm64() watchosArm32() watchosArm64() - watchosDeviceArm64() watchosX64() } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 459c2c5c6..9151f546d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,9 +1,9 @@ [versions] -kotlin = "2.0.20" +kotlin = "2.0.10" coroutines = "1.8.1" [libraries] -colormath = "com.github.ajalt.colormath:colormath:3.5.0" +colormath = "com.github.ajalt.colormath:colormath:3.6.0" markdown = "org.jetbrains:markdown:0.7.3" jna-core = "net.java.dev.jna:jna:5.14.0" diff --git a/test/graalvm/build.gradle.kts b/test/graalvm/build.gradle.kts index cd8f71fc9..cedb7e067 100644 --- a/test/graalvm/build.gradle.kts +++ b/test/graalvm/build.gradle.kts @@ -9,6 +9,7 @@ tasks.test { dependencies { implementation(project(":mordant-omnibus")) + implementation(project(":mordant-markdown")) testImplementation(kotlin("test")) } diff --git a/test/proguard/build.gradle.kts b/test/proguard/build.gradle.kts index b1004292b..f52475951 100644 --- a/test/proguard/build.gradle.kts +++ b/test/proguard/build.gradle.kts @@ -10,13 +10,16 @@ repositories { val r8: Configuration by configurations.creating dependencies { - implementation(project(":mordant")) + implementation(project(":mordant-omnibus")) + implementation(project(":mordant-markdown")) + implementation(project(":mordant-coroutines")) r8(libs.r8) } val fatJar by tasks.register("fatJar") { archiveClassifier = "fat" + duplicatesStrategy = DuplicatesStrategy.INCLUDE from(sourceSets.main.get().output) diff --git a/test/proguard/src/main/kotlin/R8SmokeTest.kt b/test/proguard/src/main/kotlin/R8SmokeTest.kt index c06a1cf42..798173ba7 100644 --- a/test/proguard/src/main/kotlin/R8SmokeTest.kt +++ b/test/proguard/src/main/kotlin/R8SmokeTest.kt @@ -1,5 +1,6 @@ package com.github.ajalt.mordant.main +import com.github.ajalt.mordant.animation.coroutines.animateInCoroutine import com.github.ajalt.mordant.animation.progress.animateOnThread import com.github.ajalt.mordant.animation.progress.execute import com.github.ajalt.mordant.markdown.Markdown @@ -7,16 +8,19 @@ import com.github.ajalt.mordant.rendering.AnsiLevel import com.github.ajalt.mordant.terminal.Terminal import com.github.ajalt.mordant.widgets.progress.progressBar import com.github.ajalt.mordant.widgets.progress.progressBarLayout +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch -fun main(args: Array) { +suspend fun main(args: Array) = coroutineScope{ // make sure that the terminal detection doesn't crash. Terminal() // make sure animations and markdown don't crash. val t = Terminal(interactive = true, ansiLevel = AnsiLevel.TRUECOLOR) - val animation = progressBarLayout { progressBar() }.animateOnThread(t, total = 1) - animation.execute() + val animation = progressBarLayout { progressBar() }.animateInCoroutine(t, total = 1) + launch { animation.execute() } t.print(Markdown("- Your args: **${args.asList()}**")) - Thread.sleep(100) + delay(100) animation.update { completed = 1 } }