We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gradle run
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.
-Djansi.passthrough=true
Adding the same flag to Gradle doesn't make a difference (gradle -Djansi.passthrough=true clean run)
gradle -Djansi.passthrough=true clean run
The text was updated successfully, but these errors were encountered:
I could get it to work by adding (thanks to chatgpt)
application { applicationDefaultJvmArgs = ["-Djansi.passthrough=true"] }
Sorry, something went wrong.
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:
run
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:
JANSI_PASSTHROUGH
JANSI_MODE
applicationDefaultJvmArgs = listOf("-Djansi.mode=force")
Or:
systemProperty("jansi.mode", "force")
No branches or pull requests
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
)The text was updated successfully, but these errors were encountered: