@Deprecated
public interface GradleExecuter
| Modifier and Type | Method and Description |
|---|---|
GradleExecuter |
afterExecute(java.util.function.Consumer<? super GradleExecuter> action)
Deprecated.
Adds an action to be called immediately after execution.
|
GradleExecuter |
beforeExecute(java.util.function.Function<? super GradleExecuter,GradleExecuter> action)
Deprecated.
Adds an action to be called immediately before execution, to allow extra configuration to be injected.
|
GradleDistribution |
getDistribution()
Deprecated.
Return the Gradle distribution used by this executer.
|
TestFile |
getTestDirectory()
Deprecated.
The directory that the executer will use for any test specific storage.
|
java.io.File |
getWorkingDirectory()
Deprecated.
Returns the working directory of this executer.
|
GradleExecuter |
ignoresMissingSettingsFile()
Deprecated.
Does not create an empty settings file when it's missing before execution.
|
GradleExecuter |
inDirectory(java.io.File directory)
Deprecated.
Sets the working directory to use.
|
GradleExecuter |
requireDaemon()
Deprecated.
Requires that the build run in a separate daemon process.
|
GradleExecuter |
requireGradleDistribution()
Deprecated.
Requires that there is a real gradle distribution for the execution, which in-process or tooling API-based execution does not.
|
GradleExecuter |
requireIsolatedDaemons()
Deprecated.
Configures that any daemons used by the execution are unique to the test.
|
GradleExecuter |
requireOwnGradleUserHomeDirectory()
Deprecated.
Configures a unique gradle user home dir for the test.
|
ExecutionResult |
run()
Deprecated.
Executes the requested build, asserting that the build succeeds.
|
ExecutionFailure |
runWithFailure()
Deprecated.
Executes the requested build, asserting that the build fails.
|
boolean |
usesDaemon()
Deprecated.
Returns true if this executer uses a daemon.
|
boolean |
usesGradleDistribution()
Deprecated.
Returns true if this executer uses a real Gradle distribution for execution.
|
boolean |
usesSharedDaemons()
Deprecated.
Returns true if this executer will share daemons with other executers.
|
GradleExecuter |
usingBuildScript(java.io.File buildScript)
Deprecated.
Uses the given build script by adding
"--build-file" argument. |
GradleExecuter |
usingInitScript(java.io.File initScript)
Deprecated.
Uses the given init script by adding
"--init-script" argument. |
GradleExecuter |
usingProjectDirectory(java.io.File projectDirectory)
Deprecated.
Uses the given project directory by adding the
"--project-dir" argument. |
GradleExecuter |
usingSettingsFile(java.io.File settingsFile)
Deprecated.
Uses the given settings file by adding
"--settings-file" argument. |
GradleExecuter |
withArgument(java.lang.String arg)
Deprecated.
Adds an additional command-line argument to use when executing the build.
|
GradleExecuter |
withArguments(java.util.List<java.lang.String> args)
Deprecated.
Sets the additional command-line arguments to use when executing the build.
|
GradleExecuter |
withArguments(java.lang.String... args)
Deprecated.
Sets the additional command-line arguments to use when executing the build.
|
GradleExecuter |
withBuildCacheEnabled()
Deprecated.
Activates the build cache.
|
GradleExecuter |
withBuildScanEnabled()
Deprecated.
Publishes build scans to the public enterprise server for each build ran by this executer.
|
GradleExecuter |
withConsole(ConsoleOutput consoleOutput)
Deprecated.
Executes the build with
"--console=rich, auto, verbose" argument. |
GradleExecuter |
withDaemonBaseDirectory(java.io.File daemonBaseDirectory)
Deprecated.
Set the working space for any daemons used by the builds.
|
GradleExecuter |
withDaemonIdleTimeout(java.time.Duration daemonIdleTimeout)
Deprecated.
Set the the idle time a daemon should live for.
|
GradleExecuter |
withDebuggerAttached()
Deprecated.
Allows to trigger on breakpoints inside the Gradle build when the debugger is attached to the caller.
|
GradleExecuter |
withDefaultCharacterEncoding(java.nio.charset.Charset defaultCharacterEncoding)
Deprecated.
Sets the default character encoding to use.
|
GradleExecuter |
withDefaultLocale(java.util.Locale defaultLocale)
Deprecated.
Sets the default locale to use.
|
GradleExecuter |
withEnvironmentVars(java.util.Map<java.lang.String,?> environment)
Deprecated.
Sets the environment variables to use when executing the build.
|
GradleExecuter |
withGradleUserHomeDirectory(java.io.File gradleUserHomeDirectory)
Deprecated.
Sets the Gradle user home dir.
|
GradleExecuter |
withoutDaemonCrashChecks()
Deprecated.
Disable crash daemon checks.
|
GradleExecuter |
withoutDeprecationChecks()
Deprecated.
Disable deprecation warning checks.
|
GradleExecuter |
withoutExplicitTemporaryDirectory()
Deprecated.
Don't set temporary folder explicitly.
|
GradleExecuter |
withPluginClasspath()
Deprecated.
Activates the plugin classpath from the plugins under test.
|
GradleExecuter |
withStacktraceDisabled()
Deprecated.
Executes the builds without adding the
"--stacktrace" argument. |
GradleExecuter |
withTasks(java.util.List<java.lang.String> tasks)
Deprecated.
Sets the task names to execute.
|
GradleExecuter |
withTasks(java.lang.String... tasks)
Deprecated.
Sets the task names to execute.
|
GradleExecuter |
withUserHomeDirectory(java.io.File userHomeDirectory)
Deprecated.
Sets the user's home dir to use when running the build.
|
GradleExecuter |
withWelcomeMessageEnabled()
Deprecated.
Renders the welcome message users see upon first invocation of a Gradle distribution with a given Gradle user home directory.
|
GradleDistribution getDistribution()
GradleDistribution instance used by this executer, never null.GradleExecuter inDirectory(java.io.File directory)
java.io.File getWorkingDirectory()
GradleExecuter withDebuggerAttached()
GradleExecuter instance that will attach the debugger, never null.GradleExecuter withTasks(java.lang.String... tasks)
GradleExecuter instance with the specified tasks to execute, never null.GradleExecuter withTasks(java.util.List<java.lang.String> tasks)
GradleExecuter withArguments(java.lang.String... args)
GradleExecuter withArguments(java.util.List<java.lang.String> args)
args - the new arguments to use, the old ones are discardedGradleExecuter instance with the new configuration.GradleExecuter withArgument(java.lang.String arg)
GradleExecuter withStacktraceDisabled()
"--stacktrace" argument.GradleExecuter withBuildCacheEnabled()
GradleExecuter withPluginClasspath()
GradleExecuter withUserHomeDirectory(java.io.File userHomeDirectory)
GradleExecuter withGradleUserHomeDirectory(java.io.File gradleUserHomeDirectory)
Note: does not affect the daemon base dir.
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.Function<? super GradleExecuter,GradleExecuter> action)
GradleExecuter afterExecute(java.util.function.Consumer<? super GradleExecuter> action)
GradleExecuter withConsole(ConsoleOutput consoleOutput)
"--console=rich, auto, verbose" argument.GradleExecuter requireOwnGradleUserHomeDirectory()
getTestDirectory() directory.
Note: does not affect the daemon base dir.
GradleExecuter withoutDeprecationChecks()
GradleExecuter with the new configuration.GradleExecuter requireGradleDistribution()
Note: try to avoid using this method. It has some major drawbacks when it comes to development: 1. It requires a Gradle distribution or installation, and this will need to be rebuilt after each change in order to use the test, and 2. it requires that the build run in a different JVM, which makes it very difficult to debug.
boolean usesGradleDistribution()
true if this executer uses a real Gradle distribution for execution or false otherwise.GradleExecuter requireIsolatedDaemons()
Note: this does not affect the Gradle user home directory.
GradleExecuter requireDaemon()
GradleExecuter instance configured to run build in a separate daemon process, never null.boolean usesDaemon()
true if the executer uses a daemon or false otherwise.boolean usesSharedDaemons()
true if the executer share daemons with other executers or false otherwise.GradleExecuter withDaemonBaseDirectory(java.io.File daemonBaseDirectory)
Note: this does not affect the Gradle user home directory.
GradleExecuter instance configured for the specified daemon base directory, never null.GradleExecuter withDaemonIdleTimeout(java.time.Duration daemonIdleTimeout)
GradleExecuter instance configured for the specified daemon idle time, never null.GradleExecuter withoutDaemonCrashChecks()
GradleExecuter instance configured without checking for daemon crash, never null.GradleExecuter withoutExplicitTemporaryDirectory()
GradleExecuter instance configured without explicit temporary directory value, never null.GradleExecuter withDefaultCharacterEncoding(java.nio.charset.Charset defaultCharacterEncoding)
GradleExecuter instance configured with the specified character encoding, never null.java.lang.UnsupportedOperationException - on non-forking executersGradleExecuter withDefaultLocale(java.util.Locale defaultLocale)
GradleExecuter instance configured with the specified locale, never null.java.lang.UnsupportedOperationException - on non-forking executersGradleExecuter withWelcomeMessageEnabled()
GradleExecuter instance configured with the welcome message on first invocation, never null.GradleExecuter withBuildScanEnabled()
GradleExecuter instance configured to publish build scans for each builds executed, never null.GradleExecuter ignoresMissingSettingsFile()
GradleExecuter instance configured to ignore default behavior when settings file is missing, never null.