-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
161 lines (127 loc) · 4.66 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
149
150
151
152
153
154
155
156
157
158
159
160
161
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.5.RELEASE")
}
}
plugins{
id 'java'
id 'war'
//id 'com.github.samueltbrown.cucumber' version '0.9'
id 'maven'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.6.3'
}
apply plugin: 'war'
war {
baseName = 'remrem-subscribe'
version = '0.5.0'
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
html.destination "${buildDir}/jacocoHtml"
}
executionData = files('build/jacoco/integrationTest.exec', 'build/jacoco/test.exec')
}
configurations {
providedRuntime
provided
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
performanceTestCompile.extendsFrom testCompile
performanceTestRuntime.extendsFrom testRuntime
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
}
resources.srcDir file('src/integration-test/resources')
}
performanceTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/performance-test/java')
}
resources.srcDir file('src/performance-test/resources')
}
}
install.dependsOn assemble
apply plugin: 'spring-boot'
task wrapper(type: Wrapper) {
gradleVersion = '2.13'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
task integrationTest(type: Test) {
jacoco {
//destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
destinationFile = file("$buildDir/jacoco/integrationTest.exec")
classDumpFile = file("$buildDir/classes/integrationTest")
}
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
}
task performanceTest(type: Test) {
useTestNG()
testClassesDir = sourceSets.performanceTest.output.classesDir
classpath = sourceSets.performanceTest.runtimeClasspath
outputs.upToDateWhen { false }
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext {
sprintBootVersion = "1.3.5.RELEASE"
atmosphereVersion = '2.4.4'
jettyVersion = '9.2.13.v20150730'
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web:$sprintBootVersion") {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
}
//ServletException requires compile time servlet dependency but it causes problems
//when deployed if exist on war run time.. hence provided but also compileOnly
compileOnly("org.springframework.boot:spring-boot-starter-tomcat")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
//gson support
compile('com.google.code.gson:gson:2.6.2')
compile 'com.rabbitmq:amqp-client:3.5.7'
compile 'org.projectlombok:lombok:1.16.8'
//swagger UI
compile 'io.springfox:springfox-swagger2:2.4.0'
compile 'io.springfox:springfox-swagger-ui:2.4.0'
// tag::actuator[]
compile("org.springframework.boot:spring-boot-starter-actuator:$sprintBootVersion")
// end::actuator[]
//compileOnly is supported in gradle 2.12 but it might be required
// in cucumber folder
compile "org.projectlombok:lombok:1.16.8"
testCompile 'junit:junit:4.12'
testCompile("org.springframework.boot:spring-boot-starter-test:$sprintBootVersion"){
exclude module: "spring-boot-starter-logging"
exclude module: "logback-classic"
}
/* //Cloud is enabled via dependency but disabled via config
compile('org.springframework.cloud:spring-cloud-starter-consul-all:1.0.0.RELEASE') {
exclude group: 'io.reactivex', module: 'rxjava'
}
compile group: 'io.reactivex', name: 'rxjava', version: '1.1.5'*/
// In order to get embedded app container to work
integrationTestCompile group: 'com.jayway.restassured', name: 'rest-assured', version: '2.9.0'
// client side api support of sse
integrationTestCompile group: 'org.glassfish.jersey.media', name: 'jersey-media-sse', version: '2.23'
// client side api support of sse
performanceTestCompile group: 'org.glassfish.jersey.media', name: 'jersey-media-sse', version: '2.23'
performanceTestCompile 'org.testng:testng:6.9.10'
}