public interface ExecTools
Various tools to deal with non-JVM, out-of-process executables.
| Modifiers | Name | Description |
|---|---|---|
enum |
ExecTools.OutputType |
Manage the output of external processes |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public AppRunnerSpec |
appRunnerSpec()Creates a AppRunnerSpec. |
|
public CommandEntryPoint |
commandEntryPoint()Returns an implementation that is optimised for the running version of Gradle. |
|
public Downloader |
downloader(String distributionName)Creates a new downloader for downloading packages / distributions. |
|
public ExecOutput |
exec(Action<? super ExecSpec> action)Executes the specified external process. |
|
public ExecOutput |
exec(ExecTools.OutputType stdout, ExecTools.OutputType stderr, Action<? super ExecSpec> action)Executes the specified external process. |
|
public ExecSpec |
execSpec()Returns something that looks like an ExecSpec. |
|
public ExecOutput |
javaexec(Action<? super JavaExecSpec> action)Executes the specified external java process. |
|
public ExecOutput |
javaexec(ExecTools.OutputType stdout, ExecTools.OutputType stderr, Action<? super JavaExecSpec> action)Executes the specified external process. |
|
public String |
parseVersionFromOutput(Iterable<String> argsForVersion, File executablePath, java.util.function.Function<String, String> versionParser)Simplifies running an executable to obtain a version. |
|
public String |
parseVersionFromOutput(Iterable<String> argsForVersion, File executablePath, java.util.function.Function<String, String> versionParser, Action<ExecSpec> configurator)Simplifies running an executable to obtain a version. |
|
public ExecOutput |
provideExec(Action<? super ExecSpec> action)Executes the specified external process on-demand. |
|
public ExecOutput |
provideJavaExec(Action<? super JavaExecSpec> action)Executes the specified external java process on-demand. |
Creates a AppRunnerSpec.
This is primarily used internally by classes that implements execution specifications for non-JVM processes.
Returns an implementation that is optimised for the running version of Gradle.
nullCreates a new downloader for downloading packages / distributions.
distributionName - Name of distribution to be downloaded.Executes the specified external process.
Outputs both standard error and standard out, but captures nothing.
action - Configures an ExecSpecExecutes the specified external process.
stdout - How to capture standard output.stderr - How to capture error output.action - Configures an ExecSpecReturns something that looks like an ExecSpec.
Executes the specified external java process.
Outputs both standard error and standard out, but captures nothing.
action - Configures a JavaExecSpecExecutes the specified external process.
stdout - How to capture standard output.stderr - How to capture error output.action - Configures an ExecSpec Simplifies running an executable to obtain a version.
This is primarily used to implement a runExecutableAndReturnVersion method.
argsForVersion - Arguments required to obtain a versionexecutablePath - Location of the executableversionParser - A parser for the output of running the executable which could extract the version. Simplifies running an executable to obtain a version.
This is primarily used to implement a runExecutableAndReturnVersion method.
argsForVersion - Arguments required to obtain a versionexecutablePath - Location of the executableversionParser - A parser for the output of running the executable which could extract the version.configurator - Additional configurator to customise the execution specification.Executes the specified external process on-demand.
action - Configures an ExecSpecExecutes the specified external java process on-demand.
action - Configures a JavaExecSpec