Skip to content

Commit

Permalink
Add more dependencies to r8 test
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt committed Aug 25, 2024
1 parent 3057899 commit a69a1c8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ kotlin {
tvosSimulatorArm64()
watchosArm32()
watchosArm64()
watchosDeviceArm64()
watchosX64()
}
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
1 change: 1 addition & 0 deletions test/graalvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tasks.test {

dependencies {
implementation(project(":mordant-omnibus"))
implementation(project(":mordant-markdown"))
testImplementation(kotlin("test"))
}

Expand Down
5 changes: 4 additions & 1 deletion test/proguard/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Jar>("fatJar") {
archiveClassifier = "fat"
duplicatesStrategy = DuplicatesStrategy.INCLUDE

from(sourceSets.main.get().output)

Expand Down
12 changes: 8 additions & 4 deletions test/proguard/src/main/kotlin/R8SmokeTest.kt
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
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
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<String>) {
suspend fun main(args: Array<String>) = 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 }
}

0 comments on commit a69a1c8

Please sign in to comment.