public interface GradleExecuter
| Modifier and Type | Method and Description |
|---|---|
GradleExecuter |
afterExecute(java.util.function.Consumer<? super GradleExecuter> action)
Adds an action to be called immediately after execution.
|
GradleExecuter |
beforeExecute(java.util.function.Consumer<? super GradleExecuter> action)
Adds an action to be called immediately before execution, to allow extra configuration to be injected.
|
TestFile |
getTestDirectory()
The directory that the executer will use for any test specific storage.
|
java.io.File |
getWorkingDirectory() |
GradleExecuter |
inDirectory(java.io.File directory)
Sets the working directory to use.
|
ExecutionResult |
run()
Executes the requested build, asserting that the build succeeds.
|
ExecutionFailure |
runWithFailure()
Executes the requested build, asserting that the build fails.
|
GradleExecuter |
usingBuildScript(java.io.File buildScript)
Uses the given build script by adding
"--build-file" argument. |
GradleExecuter |
usingInitScript(java.io.File initScript)
Uses the given init script by adding
"--init-script" argument. |
GradleExecuter |
usingProjectDirectory(java.io.File projectDirectory)
Uses the given project directory by adding the
"--project-dir" argument. |
GradleExecuter |
usingSettingsFile(java.io.File settingsFile)
Uses the given settings file by adding
"--settings-file" argument. |
GradleExecuter |
withArgument(java.lang.String arg)
Adds an additional command-line argument to use when executing the build.
|
GradleExecuter |
withArguments(java.util.List<java.lang.String> args)
Sets the additional command-line arguments to use when executing the build.
|
GradleExecuter |
withArguments(java.lang.String... args)
Sets the additional command-line arguments to use when executing the build.
|
GradleExecuter |
withBuildCacheEnabled()
Activates the build cache.
|
GradleExecuter |
withConsole(ConsoleOutput consoleOutput)
Executes the build with
"--console=rich, auto, verbose" argument. |
GradleExecuter |
withDebuggerAttached()
Allows to trigger on breakpoints inside the Gradle build when the debugger is attached to the caller.
|
GradleExecuter |
withEnvironmentVars(java.util.Map<java.lang.String,?> environment)
Sets the environment variables to use when executing the build.
|
GradleExecuter |
withPluginClasspath()
Activates the plugin classpath from the plugins under test.
|
GradleExecuter |
withStacktraceDisabled()
Executes the builds without adding the
"--stacktrace" argument. |
GradleExecuter |
withTasks(java.util.List<java.lang.String> tasks)
Sets the task names to execute.
|
GradleExecuter |
withTasks(java.lang.String... tasks)
Sets the task names to execute.
|
GradleExecuter |
withUserHomeDirectory(java.io.File userHomeDirectory)
Sets the user's home dir to use when running the build.
|
GradleExecuter inDirectory(java.io.File directory)
java.io.File getWorkingDirectory()
GradleExecuter withDebuggerAttached()
GradleExecuter withTasks(java.lang.String... tasks)
GradleExecuter withTasks(java.util.List<java.lang.String> tasks)
GradleExecuter withArguments(java.lang.String... args)
GradleExecuter withArguments(java.util.List<java.lang.String> args)
GradleExecuter withArgument(java.lang.String arg)
GradleExecuter withStacktraceDisabled()
"--stacktrace" argument.GradleExecuter withBuildCacheEnabled()
GradleExecuter withPluginClasspath()
GradleExecuter withUserHomeDirectory(java.io.File userHomeDirectory)
GradleExecuter withEnvironmentVars(java.util.Map<java.lang.String,?> environment)
GradleExecuter usingSettingsFile(java.io.File settingsFile)
"--settings-file" argument.GradleExecuter usingBuildScript(java.io.File buildScript)
"--build-file" argument.GradleExecuter usingInitScript(java.io.File initScript)
"--init-script" argument.GradleExecuter usingProjectDirectory(java.io.File projectDirectory)
"--project-dir" argument.TestFile getTestDirectory()
ExecutionResult run()
ExecutionFailure runWithFailure()
GradleExecuter beforeExecute(java.util.function.Consumer<? super GradleExecuter> action)
GradleExecuter afterExecute(java.util.function.Consumer<? super GradleExecuter> action)
GradleExecuter withConsole(ConsoleOutput consoleOutput)
"--console=rich, auto, verbose" argument.