blob: 142197c01b0d9d03c44658406c6fa3af128004b7 [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 {
api project(':tapestry-ioc')
api project(':tapestry-json')
api project(':beanmodel')
api project(':tapestry-http')
api "org.apache.commons:commons-lang3:${versions.commonsLang}"
implementation 'jakarta.annotation:jakarta.annotation-api:1.3.4'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.2'
implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.2'
implementation 'com.sun.xml.ws:jaxws-rt:2.3.2'
implementation 'javax.xml.ws:jaxws-api:2.3.1'
provided project(":tapestry-test")
provided project(":tapestry-test-constants")
provided "javax.servlet:javax.servlet-api:${versions.servletapi}"
implementation "commons-codec:commons-codec:1.10"
testImplementation "org.junit.jupiter:junit-jupiter:${versions.junitJupiter}"
testImplementation "org.apache.httpcomponents:httpclient:4.5.14"
testRuntimeOnly project(':tapestry-spock')
testRuntimeOnly "org.hsqldb:hsqldb:1.8.0.10"
testRuntimeOnly '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
test {
// Needed to have XMLTokenStreamTests.testStreamEncoding() passing on Java 9+
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_1_9)) {
jvmArgs("--add-opens=java.base/java.nio.charset=ALL-UNNAMED");
}
// TAP5-2722
systemProperty 'user.language', 'en'
}
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 runTestApp7(type:JavaExec) {
description 'Start app7 integration test app, useful when debugging failing integration tests'
main = 'org.apache.tapestry5.test.JettyRunner'
args "-d", "src/test/app7", "-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"
}