Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (38 sloc) 1.39 KB
/*apply plugin: "groovy"*/
usePlugin 'groovy'
repositories {
mavenCentral()
mavenRepo urls: "http://repo.grails.org/grails/core"
}
configurations {
testCompile.transitive = true
}
dependencies {
groovy "org.codehaus.groovy:groovy-all:1.7.2"
compile "org.spockframework:spock-core:0.5-groovy-1.7"
compile "org.hamcrest:hamcrest-all:1.1"
compile "junit:junit:4.8.1"
testCompile "org.mortbay.jetty:jetty:6.1.21"
}
test.doFirst {
def grailsWorkDir = new File(buildDir, 'grails-work')
def projectWorkDir = new File(buildDir, 'project-work')
def outputDir = new File(buildDir, 'output')
[grailsWorkDir, projectWorkDir, outputDir].each {
it.deleteDir()
assert it.mkdirs()
}
copy {
from 'src/test/resources/projects'
into projectWorkDir
}
test.options.systemProperties['buildDir'] = buildDir.canonicalPath
test.options.systemProperties['testClassesDir'] = sourceSets.test.classesDir.canonicalPath
test.options.systemProperties['grailsHome'] = System.properties['grails.home'] ?: new File('../grails-core').absolutePath
test.options.systemProperties['projectWorkDir'] = projectWorkDir.canonicalPath
test.options.systemProperties['grailsWorkDir'] = grailsWorkDir.canonicalPath
test.options.systemProperties['outputDir'] = outputDir.canonicalPath
if (project.hasProperty('tp')) {
test.include "**/${tp}Spec.*"
}
}