Exec Task does not have option for https://docs.oracle.com/javase/8/docs/api/java/lang/ProcessBuilder.Redirect.html

Am I wrong that current exec task does not have option to control:
https://docs.oracle.com/javase/8/docs/api/java/lang/ProcessBuilder.Redirect.htm

Is there any particular reason for it?

If I want to adjust the gradle source
org.gradle.process.internal.ProcessSettings
org.gradle.process.internal.ProcessBuilderFactory

and run with it, what are the steps?