How do I always force `--console auto` in a gradle properties or environment variable?

For some reason, in gradle 2.7 my RoxTerm consoles are no longer using the rich output. The auto setting is not detecting that I can have a rich output.

I’d like to set this in a but I cannot figure out from the documentation how to actually do this.

How do I set a ~/.gradle/ setting to always have --console=rich ?

AFAIK there’s not a way to force it via

Did it stop working between Gradle versions (i.e., is it a bug on our side)?

What’s your environment? If you’re on a *nix, we look at the value for TERM and if it is set and not ‘dumb’, we then check if stdout/stderr are attached to terminals.

Actually it’s not even working in 2.1… Now I’m super confused… I remember it working in version 2.1, so maybe there’s an environment thing that happened… but I’m not sure what.

My environment:

Could you run with --debug to see if you see anything like this?

“Native-platform terminal integration is not available. Continuing with fallback.”


"Unable to load from native-platform backed ConsoleDetector. Continuing with fallback. Failure: {}

$ gradle --debug
22:29:00.107 [DEBUG] [] Unable to load from native-platform backed Consol
eDetector. Continuing with fallback. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library ‘libnative-pl’ for Linux amd64.
caused by: java.lang.UnsatisfiedLinkError: /home/dkowis/.gradle/native/19/linux-amd64/ c
annot open shared object file: No such file or directory

Sure enough. I assume archlinux doesn’t have a

Yep, it’s got this:

$ pacman -Ql | grep
chef-dk /opt/chefdk/embedded/lib/
chef-dk /opt/chefdk/embedded/lib/
chef-dk /opt/chefdk/embedded/lib/
ncurses /usr/lib/

Obviously the chef-dk ones aren’t useful for you :smile:
So a workaround for me could be to make a symlink in /usr/lib to… But that isn’t actually necessary, because it works fine when I specify --console=rich

Hope all this helps.

Is something missing from your LD_LIBRARY_PATH or you’ve done a system upgrade recently? That might explain why it used to work. There might be a ncurses-5 package you could install.

It works when you use --console=rich because we forcibly use colors, even if we think the console doesn’t support them.

Ah yeah, a system update probably happened. Archlinux is a rolling distro.

core/ncurses 6.0-3 [installed]
System V Release 4.0 curses emulation library

So there is only one ncurses. I can workaround it by making a symlink in /usr/lib from to and that will probably get the job done for now. Or I can alias gradle="gradle --console=rich "


No problem. This is the lib we use:

It looks like there’s a TODO about failing more gracefully when ncurses can’t be loaded, which would probably handle your case.

I’ve stumbled over the same issue on archlinux. The latest update broke the console color support, yet it works with --console=rich.

For reference, as a temporary measure, until the library has better detection, you can do:

sudo ln -s /usr/lib/ /usr/lib/

And then gradle properly picks up that it’s rich without having to type it every time.

Or do the shell alias :slight_smile:

As an FYI, arch linux has an ncurses5-compat-libs in the AUR that gives backwards-compatibility support.