Replace provided configuration with compileOnly
diff --git a/core/build.gradle b/core/build.gradle
index 12d9754..3b156b7 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -10,18 +10,6 @@
 
 sourceCompatibility = 1.6
 
-configurations {
-    provided
-}
-
-tasks.withType(AbstractCompile) {
-    classpath += configurations.provided
-}
-
-tasks.withType(Test) {
-    classpath += configurations.provided
-}
-
 dependencies {
     compile group: 'org.jetbrains.kotlin', name: 'kotlin-runtime', version: kotlin_version
     compile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_version
@@ -45,7 +33,9 @@
     runtime files("../lib/jps-model.jar")
 
     //tools.jar
-    provided files(((URLClassLoader) ToolProvider.getSystemToolClassLoader()).getURLs().findAll { it.path.endsWith("jar") })
+    def toolsJar = files(((URLClassLoader) ToolProvider.getSystemToolClassLoader()).getURLs().findAll { it.path.endsWith("jar") })
+    compileOnly toolsJar
+    testCompile toolsJar
 
     compile project(":integration")
 
diff --git a/runners/android-gradle-plugin/build.gradle b/runners/android-gradle-plugin/build.gradle
index 7c2eaa1..6815247 100644
--- a/runners/android-gradle-plugin/build.gradle
+++ b/runners/android-gradle-plugin/build.gradle
@@ -6,12 +6,7 @@
 apply plugin: 'com.github.johnrengelman.shadow'
 apply plugin: "com.gradle.plugin-publish"
 
-configurations {
-    provided
-}
-
 tasks.withType(AbstractCompile) {
-    classpath += configurations.provided
     classpath += configurations.shadow
 }
 
@@ -25,8 +20,8 @@
     shadow project(path: ':runners:gradle-plugin', configuration: 'shadow')
     compileOnly project(':integration')
 
-    provided gradleApi()
-    provided localGroovy()
+    compileOnly gradleApi()
+    compileOnly localGroovy()
 }
 
 task sourceJar(type: Jar) {
diff --git a/runners/ant/build.gradle b/runners/ant/build.gradle
index 2622ce6..85328d9 100644
--- a/runners/ant/build.gradle
+++ b/runners/ant/build.gradle
@@ -2,17 +2,8 @@
 
 sourceCompatibility = 1.6
 
-configurations {
-    provided
-}
-
-tasks.withType(AbstractCompile) {
-    classpath += configurations.provided
-}
-
-
 dependencies {
     compile project(":core")
-    provided group: 'org.apache.ant', name: 'ant', version: ant_version
+    compileOnly group: 'org.apache.ant', name: 'ant', version: ant_version
 }
 
diff --git a/runners/fatjar/build.gradle b/runners/fatjar/build.gradle
index a3aeadc..dbd56f3 100644
--- a/runners/fatjar/build.gradle
+++ b/runners/fatjar/build.gradle
@@ -20,7 +20,7 @@
     classifier = ''
 
     configurations {
-        exclude provided
+        exclude compileOnly
     }
 
     transform(ServiceFileTransformer)
diff --git a/runners/gradle-plugin/build.gradle b/runners/gradle-plugin/build.gradle
index 1848570..7b85990 100644
--- a/runners/gradle-plugin/build.gradle
+++ b/runners/gradle-plugin/build.gradle
@@ -6,12 +6,7 @@
 apply plugin: 'com.github.johnrengelman.shadow'
 apply plugin: "com.gradle.plugin-publish"
 
-configurations {
-    provided
-}
-
 tasks.withType(AbstractCompile) {
-    classpath += configurations.provided
     classpath += configurations.shadow
 }
 
@@ -23,8 +18,8 @@
 
     compile project(":integration")
 
-    provided gradleApi()
-    provided localGroovy()
+    compileOnly gradleApi()
+    compileOnly localGroovy()
 }
 
 task sourceJar(type: Jar) {
diff --git a/runners/maven-plugin/build.gradle b/runners/maven-plugin/build.gradle
index e1a3af1..5176957 100644
--- a/runners/maven-plugin/build.gradle
+++ b/runners/maven-plugin/build.gradle
@@ -5,12 +5,7 @@
 apply plugin: 'com.github.johnrengelman.shadow'
 
 
-configurations {
-    provided
-}
-
 tasks.withType(AbstractCompile) {
-    classpath += configurations.provided
     classpath += configurations.shadow
 }