Commits

David Carr  committed 3f1d648

build: make groovy a testCompile dependency

This is the new preferred approach as of Gradle 1.4 (well, using the compile/testCompile configuration rather than the groovy configuration), and it fixes problems with cases such as mine, where I only want it for one source set.

  • Participants
  • Parent commits 1872e28

Comments (0)

Files changed (1)

File build.gradle

         }
     }
     dependencies {
-        groovy "org.codehaus.groovy:groovy-all:2.0.6"
+        testCompile "org.codehaus.groovy:groovy-all:2.0.6"
         testCompile "junit:junit-dep:4.11"
         testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
     }
     tasks.withType(Compile) {
         options.compilerArgs << "-Xlint:unchecked"
     }
-    // Work around GRADLE-1124; we need Groovy at test-time for Spock, but don't want compile-time or runtime dependency
-    configurations {
-        compile.extendsFrom = [providedCompile]
-        testCompile.extendsFrom groovy
-    }
 }