|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Gradle
A Gradle
represents an invocation of Gradle.
You can obtain a Gradle
instance by calling Project.getGradle()
. In your build file you can use
gradle
to access it.
Method Summary | |
---|---|
void |
addBuildListener(BuildListener buildListener)
Adds a BuildListener to this Build instance. |
void |
addListener(java.lang.Object listener)
Adds the given listener to this build. |
ProjectEvaluationListener |
addProjectEvaluationListener(ProjectEvaluationListener listener)
Adds a listener to this build, to receive notifications as projects are evaluated. |
void |
afterProject(groovy.lang.Closure closure)
Adds a closure to be called immediately after a project is evaluated. |
void |
beforeProject(groovy.lang.Closure closure)
Adds a closure to be called immediately before a project is evaluated. |
void |
captureStandardOutput(LogLevel level)
Starts redirection of standard output during to the logging system during init script evaluation. |
void |
disableStandardOutputCapture()
Disables redirection of standard output during init script evaluation. |
Gradle |
getGradle()
Returns this Gradle instance. |
java.io.File |
getGradleHomeDir()
Returns the Gradle home directory. |
java.io.File |
getGradleUserHomeDir()
Returns the Gradle user home directory. |
java.lang.String |
getGradleVersion()
Returns the current Gradle version. |
ScriptHandler |
getInitscript()
Returns the init script handler for this build. |
InternalRepository |
getInternalRepository()
Returns the repository used to pass artifacts between projects in this build. |
Logger |
getLogger()
Returns the logger for this build. |
Project |
getRootProject()
Returns the root project of this build. |
StartParameter |
getStartParameter()
Returns the StartParameter used to start this build. |
TaskExecutionGraph |
getTaskGraph()
Returns the TaskExecutionGraph for this build. |
void |
initscript(groovy.lang.Closure configureClosure)
Configures the init script classpath for this build. |
void |
removeListener(java.lang.Object listener)
Removes the given listener from this build. |
void |
removeProjectEvaluationListener(ProjectEvaluationListener listener)
Removes the given listener from this build. |
Method Detail |
---|
java.lang.String getGradleVersion()
Returns the current Gradle version.
java.io.File getGradleUserHomeDir()
Returns the Gradle user home directory. This directory is used to cache downloaded resources.
java.io.File getGradleHomeDir()
Returns the Gradle home directory. This directory is used to locate resources such as the default imports file.
Project getRootProject()
Returns the root project of this build.
TaskExecutionGraph getTaskGraph()
Returns the TaskExecutionGraph
for this build.
StartParameter getStartParameter()
StartParameter
used to start this build.
InternalRepository getInternalRepository()
ProjectEvaluationListener addProjectEvaluationListener(ProjectEvaluationListener listener)
listener
- The listener to add. Does nothing if this listener has already been added.
void removeProjectEvaluationListener(ProjectEvaluationListener listener)
listener
- The listener to remove. Does nothing if this listener has not been added.void beforeProject(groovy.lang.Closure closure)
closure
- The closure to execute.void afterProject(groovy.lang.Closure closure)
closure
- The closure to execute.void addBuildListener(BuildListener buildListener)
Adds a BuildListener
to this Build instance. The listener is notified of events which occur during the
execution of the build.
buildListener
- The listener to add.void addListener(java.lang.Object listener)
listener
- The listener to add. Does nothing if this listener has already been added.void removeListener(java.lang.Object listener)
listener
- The listener to remove. Does nothing if this listener has not been added.Gradle getGradle()
Gradle
instance.
ScriptHandler getInitscript()
void initscript(groovy.lang.Closure configureClosure)
ScriptHandler
. The ScriptHandler
is passed to the closure as the closure's delegate.
configureClosure
- the closure to use to configure the init script classpath.void disableStandardOutputCapture()
captureStandardOutput(org.gradle.api.logging.LogLevel)
void captureStandardOutput(LogLevel level)
StandardOutputLogging
.
level
- The level standard out should be logged to.disableStandardOutputCapture()
Logger getLogger()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |