-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The watchservice of the JVM suffers from a few drawbacks regarding its integration with the OS. In Linux in particular events of bind mounts are not received.
Let's investigate alternative, in particular the gradle native integration : https://github.com/gradle/native-platform
+ implementation("net.rubygrapefruit:file-events:0.22")
+ implementation("net.rubygrapefruit:native-platform:0.22")Currently file watching capabilities just appeared in a 0.22 milestone, unfortunately this is not completely released (platform specific native libraries are not published on bintray (for the published milestone)).
To follow https://github.com/gradle/native-platform/releases
However native-platform:0.21 is available on it's possible to play with some api like the terminal or files, e.g. :
try {
Terminals terminals = Native.get(Terminals.class);
var isTerminal = terminals.withAnsiOutput().isTerminal(Output.Stdout);
if (isTerminal) {
var terminal = terminals.withAnsiOutput().getTerminal(Output.Stdout);
terminal.write("Hello");
SECONDS.sleep(5);
terminal.cursorStartOfLine()
.clearToEndOfLine()
.bold().write("Bold hello")
.reset();
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}Metadata
Metadata
Assignees
Labels
No labels