helidon-io / helidon-build-tools

Build tools for the Helidon Project
https://helidon.io
Apache License 2.0
35 stars 35 forks source link

CLI: dependency reduction #1080

Open barchetta opened 4 weeks ago

barchetta commented 4 weeks ago

Remove the remaining third party dependencies:

  1. jansi-1.18.jar
  2. compiler-0.9.6.jar
romain-grecourt commented 4 weeks ago

For Jansi there are two distinct usages:

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()).