-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava.gradle
More file actions
31 lines (28 loc) · 822 Bytes
/
Copy pathjava.gradle
File metadata and controls
31 lines (28 loc) · 822 Bytes
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
apply plugin: 'java'
tasks.withType(JavaCompile) {
options.incremental = true
options.compilerArgs << "-Xlint:all" << "-Xlint:-processing" << "-Xlint:-serial" << "-Werror"
}
javadoc {
def events = []
StandardOutputListener listener = { event -> events << event }
doFirst {
logging.addStandardOutputListener(listener)
}
doLast {
logging.removeStandardOutputListener(listener)
if (events.find { it.toString() =~ /warning/ }) {
throw new GradleException("Warnings in Javadoc, see output above");
}
}
}
// Need all test info on command-line for TravisCI
test {
testLogging {
events "failed"
showStandardStreams = true
showStackTraces = true
exceptionFormat "full"
}
outputs.upToDateWhen { false } // Always run tests so that we have a test report on each build
}