-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
153 lines (123 loc) · 4.21 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
plugins {
id 'org.unbroken-dome.test-sets' version '1.3.2'
id 'com.github.johnrengelman.shadow' version '1.2.4'
}
group 'gofish'
version '1.0-SNAPSHOT'
task wrapper(type: Wrapper) {
gradleVersion = '3.5'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
apply plugin: 'build-dashboard'
check.mustRunAfter buildDashboard
check.dependsOn buildDashboard
reporting {
baseDir "reports"
}
ext { vertxVersion = "3.4.1"; junitVersion = "4.12"; mockitoVersion = "2.+" }
configure (subprojects) { project ->
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'jacoco'
apply plugin: 'pmd'
apply plugin: 'findbugs'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'org.unbroken-dome.test-sets'
mainClassName = 'io.vertx.core.Launcher'
repositories { mavenLocal(); mavenCentral() }
dependencies {
compile ("io.vertx:vertx-core:${vertxVersion}")
compile ("io.vertx:vertx-hazelcast:${vertxVersion}")
compile ("io.vertx:vertx-rx-java:${vertxVersion}")
compile ("io.vertx:vertx-service-discovery:${vertxVersion}")
compile ("io.vertx:vertx-service-proxy:${vertxVersion}")
//compile ("io.vertx:vertx-service-proxy:${vertxVersion}:processor")
compile ("biz.paluch.logging:logstash-gelf:1.11.1")
compileOnly ("io.vertx:vertx-codegen:${vertxVersion}")
testCompile ("io.vertx:vertx-unit:${vertxVersion}")
testCompile ("junit:junit:${junitVersion}")
testCompile ("org.mockito:mockito-core:${mockitoVersion}")
}
testSets { testIT }
assemble.dependsOn shadowJar
check.dependsOn testIT // Ensure both test and testIT run under check
task annotationProcessing(type: JavaCompile, group: 'build', description: "Generates the Vert.x proxies") {
source = sourceSets.main.java
classpath = configurations.compile + configurations.compileOnly
destinationDir = project.file('src/main/generated')
options.compilerArgs = [
"-proc:only",
"-processor", "io.vertx.codegen.CodeGenProcessor",
"-Acodegen.output=${project.projectDir}/src/main"
]
}
compileJava {
targetCompatibility = 1.8
sourceCompatibility = 1.8
dependsOn annotationProcessing
}
task jacocoTestITReport(type: JacocoReport) {
executionData project.tasks.testIT
sourceDirectories = project.files(sourceSets.main.allSource.srcDirs)
classDirectories = project.sourceSets.main.output
def reportDir = project.reporting.file("jacoco/testIT/html")
reports {
html.destination = reportDir
}
}
test {
outputs.upToDateWhen { false }
finalizedBy tasks.jacocoTestReport
jacoco {
append = false
destinationFile = new File(project.buildDir, 'jacoco/test.exec')
}
}
testIT {
outputs.upToDateWhen { false }
mustRunAfter test
finalizedBy tasks.jacocoTestITReport
jacoco {
append = false
destinationFile = new File(project.buildDir, 'jacoco/testIT.exec')
}
}
shadowJar {
classifier = null
mergeServiceFiles {
include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
}
}
tasks.withType(Test) {
reports {
junitXml.enabled = false
html.enabled = true
}
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
tasks.withType(JacocoReport) {
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['**/rxjava', '**/*VertxProxyHandler*', '**/*VertxEBProxy*'])
})
}
reports {
xml.enabled = false
html.enabled = true
}
}
tasks.withType(Pmd) {
ignoreFailures = true
// Exclude all auto-generated code
excludes += ['**/rxjava', '**/*VertxProxyHandler**', '**/*VertxEBProxy**']
reports {
xml.enabled = false
html.enabled = true
}
}
}