# Gradle Script unable to compile groovy file

**URL:** <https://discuss.gradle.org/t/gradle-script-unable-to-compile-groovy-file/22037>\
**Category:** Help/Discuss\
**Tags:** buildship\
**Created:** [March 21, 2017, 5:08am UTC](https://discuss.gradle.org/t/gradle-script-unable-to-compile-groovy-file/22037 "2017-03-21T05:08:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joinreddy](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@joinreddy](https://discuss.gradle.org/u/joinreddy)\
**Post date:** [March 21, 2017, 5:08am UTC](https://discuss.gradle.org/t/gradle-script-unable-to-compile-groovy-file/22037/1 "2017-03-21T05:08:10Z")

</div>

After adding dependency also still build is failing. Please find the below error

unable to resolve class org.apache.commons.io.FileUtils  
unable to resolve class groovyx.net.http.RESTClient

build.gradle :

buildscript {  
repositories {  
mavenCentral()  
maven {  
url ‘[http://dl.bintray.com/gesellix/docker-utils](http://dl.bintray.com/gesellix/docker-utils)’  
}  
}

```
dependencies {
   classpath 'org.apache.commons:commons-io:1.3.2'
   classpath files('C:\\Users\\xxx\\Downloads\\docker-client-master\\client\\build\\libs\\client.jar')
   classpath 'com.squareup.okhttp3:okhttp:3.6.0'
   classpath 'de.gesellix:docker-filesocket:2017-02-26T08-19-34'
   classpath 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.2'
}

```

}

---

<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:** [March 21, 2017, 2:37pm UTC](https://discuss.gradle.org/t/gradle-script-unable-to-compile-groovy-file/22037/2 "2017-03-21T14:37:47Z")

</div>

You’re adding these dependencies shown to your buildscript classpath, which would be correct only if you’re intending to use these libraries in the buildscript itself. If you’re trying to use these dependencies in groovy code that your buildscript is compiling, you need a `repositories` and `dependencies` block outside of the `buildscript` block.
