Open tauinger-de opened 4 months ago
I could get it to work by adding (thanks to chatgpt)
application {
applicationDefaultJvmArgs = ["-Djansi.passthrough=true"]
}
I could get it to work by adding (thanks to chatgpt)
application { applicationDefaultJvmArgs = ["-Djansi.passthrough=true"] }
Thank you for that solution. And if you want a narrower scope, you can instead just configure the run
task:
tasks {
named<JavaExec>("run") {
systemProperty("jansi.passthrough", "true")
}
}
- Kotlin DSL
Though note JANSI_PASSTHROUGH
is deprecated in favor of JANSI_MODE
. So, it would probably be better to use:
applicationDefaultJvmArgs = listOf("-Djansi.mode=force")
- Kotlin DSL
Or:
systemProperty("jansi.mode", "force")
- Kotlin DSL
I wrote a tiny Java application and run it through Gradle 8.5 but there is no colored output.
it works when running in Intellij with flag
-Djansi.passthrough=true
.Adding the same flag to Gradle doesn't make a difference (
gradle -Djansi.passthrough=true clean run
)