A colorful demo built with the excellent Kotlin terminal library 🩵
- Gradle example project shows reactive terminal rendering with Kotter
- GraalVM Native Image can be utilized to build native executables
- GitHub Actions workflow configured for Linux/macOS/Windows builds
To run the application during development inside a virtual terminal:
./gradlew test (run will not work with good reason1)
To generate a standalone executable for your current platform:
./gradlew nativeCompile
The binary will be located in: app/build/native/nativeCompile/
gradle/libs.versions.toml: Plugin/library dependencies and version managementapp/build.gradle.kts: Build script utilizing Gradle plugin for GraalVM Native Imageapp/src/main/kotlin/org/example/App.kt: Main rendering loop and input handling.github/workflows/release.yml: Automated native build and release pipeline
Footnotes
-
Gradle and Kotter cannot share the output streams, so Kotter tries to run inside
VirtualTerminalinstead, which we want to avoid for the native build because of its heavy GUI dependencies. ↩
