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 gradle.properties but I cannot figure out from the documentation how to actually do this.
How do I set a ~/.gradle/gradle.properties setting to always have --console=rich ?
AFAIK there’s not a way to force it via gradle.properties.
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.
$ gradle --debug
22:29:00.107 [DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Unable to load from native-platform backed Consol
eDetector. Continuing with fallback. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library ‘libnative-pl
atform-curses.so’ for Linux amd64.
caused by: java.lang.UnsatisfiedLinkError: /home/dkowis/.gradle/native/19/linux-amd64/libnative-platform-curses.so: libncurses.so.5: c
annot open shared object file: No such file or directory
Sure enough. I assume archlinux doesn’t have a libncurses.so.5
Obviously the chef-dk ones aren’t useful for you
So a workaround for me could be to make a symlink in /usr/lib to libncurses.so… But that isn’t actually necessary, because it works fine when I specify --console=rich
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 ncurses.so.5 to ncurses.so and that will probably get the job done for now. Or I can alias gradle="gradle --console=rich "