# Block buildscript - what it's for?

**URL:** <https://discuss.gradle.org/t/block-buildscript-what-its-for/23422>\
**Category:** Help/Discuss\
**Created:** [July 24, 2017, 11:03am UTC](https://discuss.gradle.org/t/block-buildscript-what-its-for/23422 "2017-07-24T11:03:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AleksG](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@AleksG](https://discuss.gradle.org/u/AleksG)\
**Post date:** [July 24, 2017, 11:03am UTC](https://discuss.gradle.org/t/block-buildscript-what-its-for/23422/1 "2017-07-24T11:03:38Z")

</div>

Please explain diferences between blocks  
buildscript {}  
allprojects {}  
and  
subprojects{}

what every of them is for?

Thanks.

---

<div class="post-metadata">

**Author:** ![Pierre1](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@Pierre1](https://discuss.gradle.org/u/Pierre1)\
**Post date:** [July 25, 2017, 8:53am UTC](https://discuss.gradle.org/t/block-buildscript-what-its-for/23422/2 "2017-07-25T08:53:14Z")

</div>

Hello,

The buildscript block is tied to the legacy binary plugin use as explained in [this section of the userguide](https://docs.gradle.org/4.0.1/userguide/plugins.html#sec:old_plugin_application). With this block you configure the classpath used to evaluate the build.gradle file.

The others block mentioned in your question are configuration closures applied to all projects or the sub projects. You can read more about this in the [multi-project build section of the userguide](https://docs.gradle.org/4.0.1/userguide/multi_project_builds.html). With these structures you can apply generic configuration in your projects.

---

<div class="post-metadata">

**Author:** ![AleksG](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@AleksG](https://discuss.gradle.org/u/AleksG)\
**Post date:** [August 1, 2017, 10:53am UTC](https://discuss.gradle.org/t/block-buildscript-what-its-for/23422/3 "2017-08-01T10:53:15Z")

</div>

Thank you for helping
