Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (50 sloc) 1.97 KB
description = "Central module for Tapestry, containing all core services and components"
antlrSource = "src/main/antlr"
antlrOutput = "$buildDir/generated-sources/antlr"
configurations {
} antlrOutput
dependencies {
compile project(':tapestry-ioc')
compile project(':tapestry-json')
provided project(":tapestry-test")
provided "javax.servlet:servlet-api:$servletAPIVersion"
compile "commons-codec:commons-codec:1.5"
// Transitive will bring in the unwanted string template library as well
compile "org.antlr:antlr-runtime:3.3", { transitive = false }
// Antlr3 tool path used with the antlr3 task
antlr3 "org.antlr:antlr:3.3"
testRuntime "org.hsqldb:hsqldb:"
// This may spin out as a plugin once we've got the details down pat
task generateGrammarSource {
description = "Generates Java sources from Antlr3 grammars."
inputs.dir file(antlrSource)
outputs.dir file(antlrOutput)
} << {
// Might have a problem here if the current directory has a space in its name
def grammars = fileTree(antlrSource).include("**/*.g") 'org.antlr.Tool', fork: true, classpath: "${configurations.antlr3.asPath}") {
arg(line: "-o ${antlrOutput}/org/apache/tapestry5/internal/antlr")
arg(line: grammars.files.join(" "))
ideaModule.dependsOn generateGrammarSource
ideaModule.doFirst {
excludeDirs -= buildDir
def generatedDir = file("$buildDir/generated-sources")
def buildMinusGeneratedDir = (buildDir.listFiles() - generatedDir) as Set<File>
excludeDirs += buildMinusGeneratedDir
compileJava.options.fork(memoryMaximumSize: '512m')
compileJava.dependsOn generateGrammarSource
// Not sure why this is necessary:
compileTestGroovy.dependsOn compileTestJava
jar {
from("src/main/filtered-resources") {
filter(ReplaceTokens, tokens: [version: project.version])
Jump to Line
Something went wrong with that request. Please try again.