Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Some changes to test handling.

- Add grails-core jar to testRuntime classpath and make test tasks dependent on the jar.
- Remove 'target' dir from testRuntime classpath (it never belonged there).
- Changed order in which build scripts are applied so that the jar task is available to the test tasks.
- Refactoring: Move testRuntime declaration to unit-test.gradle.
  • Loading branch information...
commit df042970ffb9c9b057aa199c3a7dbd3f0bb54103 1 parent 8a6d774
@hansd hansd authored
Showing with 3 additions and 3 deletions.
  1. +1 −2  build.gradle
  2. +2 −1  gradle/unit-test.gradle
View
3  build.gradle
@@ -24,7 +24,6 @@ dependencies {
lib = "$projectDir/lib"
groovy files("$lib/groovy-all-1.7.1.jar")
compile files(fileTree(dir: lib as File, includes: ['*.jar'], excludes: ['jsp-api-2.1.jar', 'groovy-all-1.7.1.jar']), "${System.getenv('JAVA_HOME')}/lib/tools.jar")
- testRuntime files('src/test', 'target', 'src/grails/grails-app/utils', ".", "src/war/WEB-INF")
jsp21 files("$lib/jsp-api-2.1.jar")
}
@@ -81,8 +80,8 @@ configure([compileJava, compileTestJava]) {
apply {
url 'gradle/docs.gradle'
- url 'gradle/unit-test.gradle'
url 'gradle/assemble.gradle'
+ url 'gradle/unit-test.gradle'
url 'gradle/maven.gradle'
url 'gradle/findbugs.gradle'
}
View
3  gradle/unit-test.gradle
@@ -11,6 +11,7 @@ configurations {
}
dependencies {
+ files('src/test', 'src/grails/grails-app/utils', projectDir, "src/war/WEB-INF", coreJar.archivePath)
coverage("net.sourceforge.cobertura:cobertura:1.9.3")
}
@@ -87,7 +88,7 @@ def createTestTaskWithoutSuffix(String name, includes, excludes) {
classpath = project.files(instrumentForCoverage.instrumentedClassesDir) + classpath + project.rootProject.configurations.coverage
}
test.dependsOn task
- task.dependsOn instrumentForCoverage
+ task.dependsOn instrumentForCoverage, coreJar
}
tasks.addRule("Pattern: testSingle<Name> will test **/<Name>Tests.class") { String taskName ->

0 comments on commit df04297

Please sign in to comment.
Something went wrong with that request. Please try again.