blob: 0bf5c122ddc303537f6cc2e589a0450e2e99dc11 [file] [log] [blame]
import org.gradle.plugins.ide.idea.model.*
import org.apache.tools.ant.filters.ReplaceTokens
import t5build.*
description = "Central module for Tapestry, containing all core services and components"
project.ext {
mainGeneratedDir = "src/main/generated"
testGeneratedDir = "src/test/generated"
}
clean.delete mainGeneratedDir, testGeneratedDir
dependencies {
compile project(':tapestry-ioc')
compile project(':tapestry-json')
compile project(':beanmodel')
provided project(":tapestry-test")
provided project(":tapestry-test-constants")
provided "javax.servlet:javax.servlet-api:${versions.servletapi}"
compile "commons-codec:commons-codec:1.10"
testRuntime "org.hsqldb:hsqldb:1.8.0.10"
testRuntime 'com.google.inject:guice:3.0'
}
task preprocessCoffeeScript(type: PreprocessCoffeeScript) {
}
task compileCoffeeScript(type: CompileCoffeeScript) {
outputDir "${mainGeneratedDir}/compiled-coffeescript"
}
task compileProcessedCoffeescript(type: CompileCoffeeScript) {
dependsOn preprocessCoffeeScript
srcDir preprocessCoffeeScript.outputDir
outputDir "${mainGeneratedDir}/compiled-processed-coffeescript"
}
task compileTestCoffeeScript(type: CompileCoffeeScript) {
srcDir "src/test/coffeescript"
outputDir "${testGeneratedDir}/compiled-coffeescript"
}
sourceSets {
main {
output.dir(compileCoffeeScript.outputDir, builtBy: compileCoffeeScript)
output.dir(compileProcessedCoffeescript.outputDir, builtBy: compileProcessedCoffeescript)
}
test {
output.dir(compileTestCoffeeScript.outputDir, builtBy: compileTestCoffeeScript)
}
}
// Not sure why this is necessary:
compileTestGroovy.dependsOn compileTestJava
jar {
from("src/main/filtered-resources") {
filter(ReplaceTokens, tokens: [version: project.version])
}
}
task runTestApp1(type:JavaExec) {
description 'Start app1 integration test app, useful when debugging failing integration tests'
main = 'org.apache.tapestry5.test.JettyRunner'
args "-d", "src/test/app1", "-p", "8080"
classpath += project.sourceSets.test.runtimeClasspath
}
task runTestApp2(type:JavaExec) {
description 'Start app2 integration test app, useful when debugging failing integration tests'
main = 'org.apache.tapestry5.test.JettyRunner'
args "-d", "src/test/app2", "-p", "8080"
classpath += project.sourceSets.test.runtimeClasspath
}
task runTestApp3(type:JavaExec) {
description 'Start app3 integration test app, useful when debugging failing integration tests'
main = 'org.apache.tapestry5.test.JettyRunner'
args "-d", "src/test/app3", "-p", "8080"
classpath += project.sourceSets.test.runtimeClasspath
}
task runTestApp4(type:JavaExec) {
description 'Start app4 integration test app, useful when debugging failing integration tests'
main = 'org.apache.tapestry5.test.JettyRunner'
args "-d", "src/test/app4", "-p", "8080"
classpath += project.sourceSets.test.runtimeClasspath
}
task runTestApp5(type:JavaExec) {
description 'Start app5 integration test app, useful when debugging failing integration tests'
main = 'org.apache.tapestry5.test.JettyRunner'
args "-d", "src/test/app5", "-p", "8080"
classpath += project.sourceSets.test.runtimeClasspath
}
task runTestAppfolder(type:JavaExec) {
description 'Start appFolder integration test app, useful when debugging failing integration tests'
main = 'org.apache.tapestry5.test.JettyRunner'
args "-d", "src/test/appfolder", "-p", "8080"
classpath += project.sourceSets.test.runtimeClasspath
}
task testWithPrototype(type:Test) {
systemProperties."tapestry.javascript-infrastructure-provider" = "prototype"
}