Script Handler
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 getBuildscript or getBuildscript.
To declare the script classpath, you use the org.gradle.api.artifacts.dsl.DependencyHandler provided by getDependencies to attach dependencies to the {@value #CLASSPATH_CONFIGURATION} configuration. These dependencies are resolved just prior to script compilation, and assembled into the classpath for the script.
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.
Properties
Functions
Configures the dependency locking for the script dependency configurations.
ClassLoader
which contains the classpath for this script.Configures the repositories for the script dependencies.