Interface BaseExecSpec

All Superinterfaces:
ProcessForkOptions
All Known Subinterfaces:
ExecSpec, JavaExecSpec
All Known Implementing Classes:
AbstractExecTask, Exec, JavaExec, RunTestExecutable

public interface BaseExecSpec extends ProcessForkOptions
Specifies options for launching a child process.
  • Method Details

    • getIgnoreExitValue

      Property<Boolean> getIgnoreExitValue()
      Tells whether a non-zero exit value is ignored, or an exception thrown. Defaults to false.
      Returns:
      whether a non-zero exit value is ignored, or an exception thrown
    • setIgnoreExitValue

      BaseExecSpec setIgnoreExitValue(boolean ignoreExitValue)
      Sets whether a non-zero exit value is ignored, or an exception thrown.
      Parameters:
      ignoreExitValue - whether a non-zero exit value is ignored, or an exception thrown
      Returns:
      this
    • getIsIgnoreExitValue

      default Property<Boolean> getIsIgnoreExitValue()
      Added for Kotlin DSL source compatibility.
    • getStandardInput

      Property<InputStream> getStandardInput()
      Returns the standard input stream for the process executing the command. The stream is closed after the process completes. Defaults to an empty stream.
      Returns:
      The standard input stream.
    • setStandardInput

      BaseExecSpec setStandardInput(InputStream standardInput)
      Sets the standard input stream for the process executing the command. The stream is closed after the process completes.
      Parameters:
      standardInput - The standard input stream for the process. Must not be null.
      Returns:
      this
    • getStandardOutput

      Property<OutputStream> getStandardOutput()
      Returns the output stream to consume standard output from the process executing the command. Defaults to System.out.
      Returns:
      The output stream
    • setStandardOutput

      BaseExecSpec setStandardOutput(OutputStream standardOutput)
      Sets the output stream to consume standard output from the process executing the command. The stream is closed after the process completes.
      Parameters:
      standardOutput - The standard output stream for the process. Must not be null.
      Returns:
      this
    • getErrorOutput

      Property<OutputStream> getErrorOutput()
      Returns the output stream to consume standard error from the process executing the command. Default to System.err.
      Returns:
      The error output stream.
    • setErrorOutput

      BaseExecSpec setErrorOutput(OutputStream errorOutput)
      Sets the output stream to consume standard error from the process executing the command. The stream is closed after the process completes.
      Parameters:
      errorOutput - The standard output error stream for the process. Must not be null.
      Returns:
      this
    • getCommandLine

      Provider<List<String>> getCommandLine()
      Returns the full command line, including the executable plus its arguments.
      Returns:
      The full command line, including the executable plus its arguments