|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gradle.GradleLauncher
@Deprecated public abstract class GradleLauncher
Executes a Gradle build.
GradleLauncher is deprecated. It has been replaced by the Tooling API. If you're interested in embedding Gradle you should read the user guide chapter on embedding Gradle. The main entry point to the Tooling API (and embedding Gradle) is org.gradle.tooling.GradleConnector.
You should try using the Tooling API (via GradleConnector) instead of GradleLauncher. However, if you need some capability that isn't yet implemented in the Tooling API here is how you use GradleLauncher:
Method Summary | |
---|---|
void
|
addListener(Object listener)
|
void
|
addStandardErrorListener(StandardOutputListener listener)
|
void
|
addStandardOutputListener(StandardOutputListener listener)
|
static StartParameter
|
createStartParameter(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 GradleLauncherFactory
|
getFactory()
|
StartParameter
|
getStartParameter()
Returns the StartParameter used by this build instance. |
static void
|
injectCustomFactory(GradleLauncherFactory gradleLauncherFactory)
|
static GradleLauncher
|
newInstance(StartParameter startParameter)
Returns a GradleLauncher instance based on the passed start parameter. |
static GradleLauncher
|
newInstance(String... commandLineArgs)
Returns a GradleLauncher instance based on the passed command line syntax arguments. |
BuildResult
|
run()
|
void
|
useLogger(Object logger)
Use the given listener. |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail |
---|
public void addListener(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.
@Deprecated public static StartParameter createStartParameter(String... commandLineArgs)
commandLineArgs
- A String array where each element denotes an entry of the Gradle command line syntax
public BuildResult getBuildAnalysis()
public BuildResult getBuildAndRunAnalysis()
@Deprecated public static GradleLauncherFactory getFactory()
public StartParameter getStartParameter()
@Deprecated public static void injectCustomFactory(GradleLauncherFactory gradleLauncherFactory)
@Deprecated public static GradleLauncher newInstance(StartParameter startParameter)
startParameter
- The start parameter object the GradleLauncher instance is initialized with
@Deprecated public static GradleLauncher newInstance(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(Object logger)
logger
- The logger to use.
Gradle API 1.12