tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkemn...@apache.org
Subject tapestry-5 git commit: use the ANTLR plugin that comes with Gradle
Date Wed, 03 Jun 2015 08:12:15 GMT
Repository: tapestry-5
Updated Branches:
  refs/heads/master 867e32c30 -> 94cd5b5af


use the ANTLR plugin that comes with Gradle


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/94cd5b5a
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/94cd5b5a
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/94cd5b5a

Branch: refs/heads/master
Commit: 94cd5b5afdd818c04edb70dd308eb8188ec6575a
Parents: 867e32c
Author: Jochen Kemnade <jochen.kemnade@eddyson.de>
Authored: Wed Jun 3 10:11:19 2015 +0200
Committer: Jochen Kemnade <jochen.kemnade@eddyson.de>
Committed: Wed Jun 3 10:11:19 2015 +0200

----------------------------------------------------------------------
 beanmodel/build.gradle | 58 ++++-----------------------------------------
 1 file changed, 5 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/94cd5b5a/beanmodel/build.gradle
----------------------------------------------------------------------
diff --git a/beanmodel/build.gradle b/beanmodel/build.gradle
index f6a73f4..ca1908e 100644
--- a/beanmodel/build.gradle
+++ b/beanmodel/build.gradle
@@ -4,32 +4,18 @@ import t5build.*
 description = "Fast class property discovery, reading and writing library based on bytecode
generation. Extracted from Apache Tapestry, but not dependent on the Web framework (tapestry-core)
nor the IoC one (tapestry-ioc)."
 
 //apply plugin: JavaPlugin
+apply plugin: 'antlr'
 
 buildDir = 'target/gradle-build'
 
-project.ext {
-	antlrSource = "src/main/antlr"
-	mainGeneratedDir = "src/main/generated"
-	testGeneratedDir = "src/test/generated"
-	antlrOutput = "$mainGeneratedDir/antlr"
-}
-
-configurations {
-	antlr3
-}
-      
-project.ext.libraryVersions = [
-	jcache: '1.0.0',
-]
-
 dependencies {
 	compile project(":plastic")
 	compile project(":tapestry5-annotations")
 	compile project(":commons")
 	compile "org.slf4j:slf4j-api:${versions.slf4j}"
 	
-	// Antlr3 tool path used with the antlr3 task
-	antlr3 "org.antlr:antlr:3.5.2"
+	// ANTLR tool path used with the generateGrammarSource task
+	antlr "org.antlr:antlr:3.5.2"
 
 	// Transitive will bring in the unwanted string template library as well
 	compile "org.antlr:antlr-runtime:3.5.2", {
@@ -37,44 +23,10 @@ dependencies {
 	}
     
     testCompile "org.testng:testng:${versions.testng}", { transitive = false }
-    
 }
 
-// This may spin out as a plugin once we've got the details down pat
-
-task generateGrammarSource(type: JavaExec) {
-	description "Generates Java sources from Antlr3 grammars."
-	inputs.source fileTree(dir: antlrSource, include: "**/*.g")
-	outputs.dir file(antlrOutput)
-
-	classpath configurations.antlr3
-
-	main "org.antlr.Tool"
-	args "-o", "${antlrOutput}/org/apache/tapestry5/internal/antlr"
-	args inputs.sourceFiles
-
-	doFirst {
-		logger.info "Executing Antlr3 grammar generation:\n${commandLine.join(' ')}"
-	}
-}
-
-sourceSets {
-	main {
-		output.dir(antlrOutput, builtBy: generateGrammarSource)
-		java {
-			srcDir antlrOutput
-		}
-	}
-}
-
-clean.delete mainGeneratedDir, testGeneratedDir
+clean.delete generateGrammarSource.outputDirectory
 
 compileJava {
-	dependsOn generateGrammarSource
 	options.fork(memoryMaximumSize: '512m')
-}
-
-jar {	
-	manifest {	
-	}
-}
+}
\ No newline at end of file


Mime
View raw message