In writing a plugin for a custom compiler (linux), inside a WorkAction (Gradle API 8.10), should I use a ProcessBuilder (Java SE 17 & JDK 17) or should I use an instance of Exec (Gradle API 8.10)?
I will need to consume stdout and stderr so the process does not block, and I need to get the exit status, as well as parse the contents of stdout and stderr. Multiple invocations should also work in parallel, and everything must halt itself if an error occurs (no point in keeping the other parallel invocation going if one fails). I looked at how Gradle supports Cpp but the code is too hard to follow for me to draw my own conclusion. Thanks in advance for any advice.