Open barchetta opened 4 weeks ago
For Jansi there are two distinct usages:
org.fusesource.jansi.Ansi
ansi escapes constants, this should be fairly simple to rewrite.org.fusesource.jansi.AnsiConsole
to install System.out
and System.err
.The installed PrintStream
are system specific and respond to various system properties which are used in build-tools. Overall this is fairly complicated, although removing Jansi with our own mechanism would simplify this area.
AnsiConsole uses JNI to detect if STDOUT or STDERR are TTY.
The native code is provided for 7 platforms: linux32
, linux64
, windows32
, windows64
, freebsd32
, freebsd64
, osx
. It is mostly a wrapper around isatty
from the standard C library + workaround for windows.
We may be able to just use System.console() != null
or [System.console().isTerminal()
](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/io/Console.html#isTerminal()).
Remove the remaining third party dependencies: