|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gradle.Gradle
public class Gradle
Gradle is the main entry point for embedding Gradle. You use this class to manage a Gradle build, as
follows:
StartParameter instance and configure it with the desired properties. The properties of StartParameter generally correspond to the command-line options of Gradle.Gradle instance by calling newInstance(org.gradle.StartParameter), passing in the StartParameter.BuildListeners to receive events as the build executes by calling addBuildListener(org.gradle.BuildListener).run() to execute the build. This will return a BuildResult. Note that if the build fails, the
resulting exception will be contained in the BuildResult.BuildResult.rethrowFailure() to rethrow any build
failure.
| Constructor Summary | |
|---|---|
Gradle(StartParameter startParameter,
ISettingsFinder settingsFinder,
IGradlePropertiesLoader gradlePropertiesLoader,
SettingsProcessor settingsProcessor,
BuildLoader buildLoader,
org.gradle.configuration.BuildConfigurer buildConfigurer)
|
|
| Method Summary | |
|---|---|
void |
addBuildListener(BuildListener buildListener)
Adds a BuildListener to this Gradle 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. |
StartParameter |
getStartParameter()
|
static void |
injectCustomFactory(GradleFactory gradleFactory)
|
static Gradle |
newInstance(StartParameter startParameter)
Returns a Gradle instance based on the passed start parameter. |
static Gradle |
newInstance(java.lang.String[] commandLineArgs)
Returns a Gradle instance based on the passed command line syntax arguments. |
BuildResult |
run()
Executes the build for this Gradle instance and returns the result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Gradle(StartParameter startParameter,
ISettingsFinder settingsFinder,
IGradlePropertiesLoader gradlePropertiesLoader,
SettingsProcessor settingsProcessor,
BuildLoader buildLoader,
org.gradle.configuration.BuildConfigurer buildConfigurer)
| Method Detail |
|---|
public BuildResult run()
Executes the build for this Gradle instance and returns the result. Note that when the build fails, the
exception is available using BuildResult.getFailure().
public BuildResult getBuildAnalysis()
Build.getRootProject() object.
public BuildResult getBuildAndRunAnalysis()
Build.getRootProject() object. Fills the execution plan without running the build.
The tasks to be executed tasks are available via Build.getTaskGraph().
public static Gradle newInstance(StartParameter startParameter)
startParameter - The start parameter object the Gradle instance is initialized withpublic static Gradle newInstance(java.lang.String[] commandLineArgs)
createStartParameter(String[]) in conjunction with newInstance(String[]).
commandLineArgs - A String array where each element denotes an entry of the Gradle command line syntaxpublic static StartParameter createStartParameter(java.lang.String[] commandLineArgs)
commandLineArgs - A String array where each element denotes an entry of the Gradle command line syntaxpublic static void injectCustomFactory(GradleFactory gradleFactory)
public StartParameter getStartParameter()
public void addBuildListener(BuildListener buildListener)
Adds a BuildListener to this Gradle instance. The listener is notified of events which occur during a
build.
buildListener - The listener to add.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||