# Gradle-Android: Where is the classpath() coming from?

**URL:** https://discuss.gradle.org/t/gradle-android-where-is-the-classpath-coming-from/26760
**Category:** Help/Discuss
**Created:** [April 27, 2018, 10:39am UTC](https://discuss.gradle.org/t/gradle-android-where-is-the-classpath-coming-from/26760 "2018-04-27T10:39:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tomasmichael995](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tomasmichael995](https://discuss.gradle.org/u/tomasmichael995)
#### Post date: [April 27, 2018, 10:39am UTC](https://discuss.gradle.org/t/gradle-android-where-is-the-classpath-coming-from/26760/1 "2018-04-27T10:39:16Z")

</div>

Here is the root **build.gradle** file of an android app. I want to ask where does the `classpath()` method is declared. I guess in Project but I cant find it in the reference.

```
buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
```

---

<div class="post-metadata">

### Author: ![jjustinic](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jjustinic/32/9005_2.png) [@jjustinic](https://discuss.gradle.org/u/jjustinic)
#### Post date: [April 27, 2018, 1:02pm UTC](https://discuss.gradle.org/t/gradle-android-where-is-the-classpath-coming-from/26760/2 "2018-04-27T13:02:03Z")

</div>

The `buildscript` block is special because it is compiled and executed before the rest of the script to determine the classpath for the build itself. There are configurations and dependencies for this just as there are for the project. The `classpath` is just the configuration that is used for the buildscript to resolve dependencies (equivalent to `compile` for Java in your previous question). Unlike on the project, there are typically not any additional configurations beyond `classpath`.

The `buildscript` block is a `ScriptHandler`. There is a constant for `classpath` on that interface.
