forked from got5/tapestry5-jquery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
150 lines (113 loc) · 3.76 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
description = "Tapestry 5 Jquery Project"
import org.gradle.api.Project
apply plugin: 'base'
apply plugin: 'java'
apply plugin: 'groovy' // mostly for testing
apply plugin: 'maven'
apply plugin: 'project-report'
apply plugin: 'war'
apply plugin: 'jetty'
// Specific to top-level build, not set for subprojects:
def jdkVersion = System.properties['java.version']
def specifyMaxPermSize = jdkVersion ==~ /1\.[67].+/
def version = "4.0-rc-1"
def group = "org.got5"
configurations {
provided
deployerJars
binaries // additional dependencies included in the binary archive
}
// See http://jira.codehaus.org/browse/GRADLE-784
sourceSets {
main {
compileClasspath += configurations.provided
}
test {
compileClasspath += configurations.provided
runtimeClasspath += configurations.provided
}
}
Project projectDef = project;
project.ext.versions = [
tapestryVersion: "5.4-rc-1",
jetty: "7.6.11.v20130520",
tomcat: "6.0.30",
testng: "6.8.21",
easymock: "3.3.1",
servletapi: "2.5",
spock: "1.0-groovy-2.3",
hibernate: "4.3.6.Final",
slf4j: "1.7.13",
geb: "0.10.0",
selenium: "2.45.0"
]
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://repository.apache.org/content/repositories/staging/"
}
}
dependencies {
compile "org.apache.tapestry:tapestry-core:${versions.tapestryVersion}"
compile "commons-io:commons-io:2.4"
compile "org.apache.commons:commons-lang3:3.1"
testCompile "javax.servlet:servlet-api:2.5"
testCompile "org.apache.tapestry:tapestry-test:${versions.tapestryVersion}"
testCompile "org.codehaus.groovy:groovy-all:1.8.6"
testCompile "org.spockframework:spock-core:${versions.spock}"
testRuntime "org.slf4j:slf4j-api:1.6.1"
testRuntime "org.slf4j:slf4j-log4j12:1.6.1"
testCompile "org.testng:testng:${versions.testng}", { transitive = false }
testRuntime "org.seleniumhq.selenium:selenium-java:${versions.selenium}"
testRuntime "org.seleniumhq.selenium:selenium-server:${versions.selenium}"
testRuntime "org.apache.commons:commons-exec:1.3"
testRuntime "org.eclipse.jetty:jetty-server:${versions.jetty}"
testRuntime "org.eclipse.jetty:jetty-util:${versions.jetty}"
}
jettyRun {
dependsOn testClasses
classpath = sourceSets.main.runtimeClasspath + sourceSets.test.runtimeClasspath
httpPort = 8080
webXml = new File("$projectDef.projectDir/src/test/webapp/WEB-INF/web.xml")
webAppSourceDirectory = new File("$projectDef.projectDir/src/test/webapp")
}
compileTestGroovy.dependsOn compileTestJava
compileTestGroovy {
configure(groovyOptions.forkOptions) {
memoryMaximumSize = '1g'
jvmArgs = ['-Xms512m', '-Xmx1g']
if (specifyMaxPermSize){
jvmArgs << '-XX:MaxPermSize=512m'
}
}
}
test {
useJUnit()
maxHeapSize = "400M"
systemProperties["tapestry.service-reloading-enabled"] = "false"
jvmArgs("-XX:MaxPermSize=512m")
logging.captureStandardOutput LogLevel.INFO
getLogging().setLevel(LogLevel.INFO)
}
task testng(type: Test) {
useTestNG()
options.suites("src/test/conf/testng.xml")
if (specifyMaxPermSize){
maxHeapSize "400M"
jvmArgs("-XX:MaxPermSize=200m")
}else{
maxHeapSize "600M"
}
// Turn off live service reloading
systemProperties["tapestry.service-reloading-enabled"] = "false"
jvmArgs("-Dfile.encoding=UTF-8")
environment.LANG = 'en_US.UTF-8'
logging.captureStandardOutput LogLevel.INFO
getLogging().setLevel(LogLevel.INFO)
}
jar {
manifest {
attributes 'Tapestry-Module-Classes': 'org.got5.tapestry5.jquery.services.JQueryModule'
}
}