[GRADLE-2724] No way to off color output in a persistent way Created: 26/Mar/13  Updated: 02/Feb/17  Resolved: 02/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Won't Fix Votes: 0


 Description   

I would like to always turn off color because I can't read it when it has color. Is there a settings file? I tried setting GRADLE_OPTS

C:\depot\CoreLibs\main>echo %GRADLE_OPTS%
--no-color

C:\depot\CoreLibs\main>gradle tasks
Unknown option or illegal argument: --no-color.
Please check for incorrect spelling or review documentation of startup options.

Could not create the Java virtual machine.

With GRADLE_OPTS unset I can do this

C:\depot\CoreLibs\main>set GRADLE_OPTS=

C:\depot\CoreLibs\main>gradle --no-color show
sourceSets.all
main
sourceSets.all
test
:show
VARS
version: 4.1.2.3

BUILD SUCCESSFUL

Total time: 5.462 secs

using
C:\depot\CoreLibs\main>gradle -version

------------------------------------------------------------
Gradle 1.4
------------------------------------------------------------

Gradle build time: Monday, January 28, 2013 3:42:46 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.6.0_37 (Oracle Corporation R28.2.5-20-152429-1.6.0_37-20120927-1915-windows-x86_64)
OS: Windows 7 6.1 amd64



 Comments   
Comment by Gradle Forums [ 26/Mar/13 ]

Try as I might, I cannot find any way to configure the '--no-color' setting except as a command-line argument to Gradle. Other startup parameters can be tweaked in your build script, but logging is initialised very early and so misses any changes done in an init script or build script.

This is pretty unfortunate. Ideally, we'd support a system property to allow you to disable the color output.

Comment by Gradle Forums [ 26/Mar/13 ]

Ideally I'd like a .gradle file in my home directory where I could set any command line options I want to set persistently. Thank you for checking on this for me

Comment by Gradle Forums [ 26/Mar/13 ]

You can do this effectively with an `init.gradle` file in your home directory. Almost every command-line option can be set via this file: unfortunately the --no-color option doesn't work this way.

Comment by Gradle Forums [ 26/Mar/13 ]

Thanks. I'm not how to set this to answered - even if it's not the answer I wished for.

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 02/Feb/17 ]

There hasn't been a lot of demand for this feature. Please open an issue on GitHub if you think this feature is crucial.

Generated at Wed Jun 30 12:29:46 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.