|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gradle.GradleLauncher
public abstract class GradleLauncher
GradleLauncher is the main entry point for embedding Gradle. You use this class to manage a Gradle build, as follows:
Method Summary | |
---|---|
void
|
addListener(java.lang.Object listener)
Adds a listener to this build instance. |
void
|
addStandardErrorListener(StandardOutputListener listener)
Adds a StandardOutputListener to this build instance. |
void
|
addStandardOutputListener(StandardOutputListener listener)
Adds a StandardOutputListener to this build instance. |
static StartParameter
|
createStartParameter(java.lang.String commandLineArgs)
Returns a StartParameter object out of command line syntax arguments. |
BuildResult
|
getBuildAnalysis()
Evaluates the settings and all the projects. |
BuildResult
|
getBuildAndRunAnalysis()
Evaluates the settings and all the projects. |
static void
|
injectCustomFactory(GradleLauncherFactory gradleLauncherFactory)
|
static GradleLauncher
|
newInstance(StartParameter startParameter)
Returns a GradleLauncher instance based on the passed start parameter. |
static GradleLauncher
|
newInstance(java.lang.String commandLineArgs)
Returns a GradleLauncher instance based on the passed command line syntax arguments. |
BuildResult
|
run()
Executes the build for this GradleLauncher instance and returns the result. |
void
|
useLogger(java.lang.Object logger)
Use the given listener. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Method Detail |
---|
public void addListener(java.lang.Object listener)
Adds a listener to this build instance. The listener is notified of events which occur during the execution of the build. See Gradle.addListener for supported listener types.
listener
- The listener to add. Has no effect if the listener has already been added.
public void addStandardErrorListener(StandardOutputListener listener)
Adds a StandardOutputListener to this build instance. The listener is notified of any text written to standard error by Gradle's logging system
listener
- The listener to add. Has no effect if the listener has already been added.
public void addStandardOutputListener(StandardOutputListener listener)
Adds a StandardOutputListener to this build instance. The listener is notified of any text written to standard output by Gradle's logging system
listener
- The listener to add. Has no effect if the listener has already been added.
public static StartParameter createStartParameter(java.lang.String commandLineArgs)
commandLineArgs
- A String array where each element denotes an entry of the Gradle command line syntax
public BuildResult getBuildAnalysis()
public BuildResult getBuildAndRunAnalysis()
public static void injectCustomFactory(GradleLauncherFactory gradleLauncherFactory)
public static GradleLauncher newInstance(StartParameter startParameter)
startParameter
- The start parameter object the GradleLauncher instance is initialized with
public static GradleLauncher newInstance(java.lang.String commandLineArgs)
commandLineArgs
- A String array where each element denotes an entry of the Gradle command line syntax
public BuildResult run()
Executes the build for this GradleLauncher instance and returns the result. Note that when the build fails, the exception is available using BuildResult.getFailure.
public void useLogger(java.lang.Object logger)
logger
- The logger to use.
Groovy Documentation