|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
interface ScriptHandler
A ScriptHandler allows you to manage the compilation and execution of a build script. You can declare the classpath used to compile and execute a build script. This classpath is also used to load the plugins which the build script uses. You can obtain a ScriptHandler instance using org.gradle.api.Project#getBuildscript().
To declare the script classpath, you use the org.gradle.api.artifacts.dsl.DependencyHandler provided by #getDependencies() to attach dependencies to the {
For most external dependencies you will also need to declare one or more repositories where the dependencies can be found, using the org.gradle.api.artifacts.dsl.RepositoryHandler provided by #getRepositories().
Field Summary | |
---|---|
java.lang.String |
CLASSPATH_CONFIGURATION
The name of the configuration used to assemble the script classpath. |
Method Summary | |
---|---|
void
|
dependencies(Closure configureClosure)
Configures the dependencies for the script. |
java.lang.ClassLoader
|
getClassLoader()
Returns the { |
ConfigurationContainer
|
getConfigurations()
Returns the configurations of this handler. |
DependencyHandler
|
getDependencies()
Returns the dependencies of the script. |
RepositoryHandler
|
getRepositories()
Returns a handler to create repositories which are used for retrieving dependencies for the script classpath. |
void
|
repositories(Closure configureClosure)
Configures the repositories for the script dependencies. |
Field Detail |
---|
java.lang.String CLASSPATH_CONFIGURATION
Method Detail |
---|
public void dependencies(Closure configureClosure)
public java.lang.ClassLoader getClassLoader()
public ConfigurationContainer getConfigurations()
public DependencyHandler getDependencies()
public RepositoryHandler getRepositories()
public void repositories(Closure configureClosure)
Groovy Documentation