anchor.diff:  
   If your build script needs to use external libraries, you can add them to the script's classpath in the build script itself. You do this using the `buildscript()` method, passing in a closure which declares the build script classpath.
   
  -=== Example: Declaring external dependencies for the build script
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/userguide/tutorial/externalDependency/build.gradle[tag=declare-classpath]
  -----
  +.Declaring external dependencies for the build script
  +====
  +include::sample[dir="userguide/tutorial/externalDependency", files="build.gradle[tag=declare-classpath]"]
  +====
   
   The closure passed to the `buildscript()` method configures a link:{javadocPath}/org/gradle/api/initialization/dsl/ScriptHandler.html[ScriptHandler] instance. You declare the build script classpath by adding dependencies to the `classpath` configuration. This is the same way you declare, for example, the Java compilation classpath. You can use any of the <<dependency_types.adoc#dependency_types,dependency types>> except project dependencies.
   
   Having declared the build script classpath, you can use the classes in your build script as you would any other classes on the classpath. The following example adds to the previous example, and uses classes from the build script classpath.
   
  -=== Example: A build script with external dependencies
  -
  -[source.multi-language-sample,groovy]
  -.build.gradle
  -----
  -include::{samplesPath}/userguide/tutorial/externalDependency/build.gradle[tag=all]
  -----
  +.A build script with external dependencies
  +====
  +include::sample[dir="userguide/tutorial/externalDependency", files="build.gradle[tag=all]"]
   
   .Output of **`gradle -q encode`**
   ----
   > gradle -q encode
   include::{samplesPath}/userguide/tutorial/externalDependency/externalBuildDependency.out[]
   ----
  +====
   
   For multi-project builds, the dependencies declared with a project's `buildscript()` method are available to the build scripts of all its sub-projects.
   
  
positive.code: 
  Gradle's build scripts give you the full power of Groovy. As an appetizer, have a look at this:
  
  === Example: Using Groovy in Gradle's tasks
  
  [source.multi-language-sample,groovy]
  .build.gradle
  ----
  include::{samplesPath}/userguide/tutorial/upper/build.gradle[]
  ----
  
  .Output of **`gradle -q upper`**
  ----
  > gradle -q upper
  include::{samplesPath}/userguide/tutorial/upper/upper.out[]
  ----
  
  or
  
  === Example: Using Groovy in Gradle's tasks
  
  [source.multi-language-sample,groovy]
  .build.gradle
  ----
  include::{samplesPath}/userguide/tutorial/count/build.gradle[]
  ----
  
  .Output of **`gradle -q count`**
  ----
  > gradle -q count
  include::{samplesPath}/userguide/tutorial/count/count.out[]
  ----
  
  
  [[sec:task_dependencies]]
  
negative.code: 
  There is a shorthand way to define a task like our `hello` task above, which is more concise.
  
  .A task definition shortcut
  ====
  include::sample[dir="userguide/tutorial/helloShortcut", files="build.gradle[]"]
  ====
  
  Again, this defines a task called `hello` with a single closure to execute. The `&lt;&lt;` operator is simply an alias for `doLast`.
  
  