1
1
/*
2
- * Copyright 2015-2018 the original author or authors.
2
+ * Copyright 2015-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ plugins {
26
26
subprojects {
27
27
apply plugin : ' io.spring.dependency-management'
28
28
apply plugin : ' com.github.sherter.google-java-format'
29
-
29
+
30
30
ext[' reactor-bom.version' ] = ' Dysprosium-SR6'
31
31
ext[' logback.version' ] = ' 1.2.3'
32
32
ext[' findbugs.version' ] = ' 3.0.2'
@@ -109,25 +109,61 @@ subprojects {
109
109
}
110
110
111
111
javadoc {
112
+ def jdk = JavaVersion . current(). majorVersion
113
+ def jdkJavadoc = " https://docs.oracle.com/javase/$jdk /docs/api/"
114
+ if (JavaVersion . current(). isJava11Compatible()) {
115
+ jdkJavadoc = " https://docs.oracle.com/en/java/javase/$jdk /docs/api/"
116
+ }
112
117
options. with {
113
- links ' https://docs.oracle.com/javase/8/docs/api/ '
118
+ links jdkJavadoc
114
119
links ' https://projectreactor.io/docs/core/release/api/'
115
120
links ' https://netty.io/4.1/api/'
116
121
}
117
122
}
118
123
124
+ tasks. named(" javadoc" ). configure {
125
+ onlyIf { System . getenv(' SKIP_RELEASE' ) != " true" }
126
+ }
127
+
119
128
test {
120
129
useJUnitPlatform()
121
130
131
+ systemProperty " io.netty.leakDetection.level" , " ADVANCED"
132
+ }
133
+
134
+ // all test tasks will show FAILED for each test method,
135
+ // common exclusions, no scanning
136
+ project. tasks. withType(Test ). all {
122
137
testLogging {
123
- events " started" , " passed" , " skipped" , " failed"
138
+ events " FAILED"
139
+ showExceptions true
140
+ exceptionFormat " FULL"
141
+ stackTraceFilters " ENTRY_POINT"
142
+ maxGranularity 3
124
143
}
125
144
126
- systemProperty " io.netty.leakDetection.level" , " ADVANCED"
127
- }
145
+ if (JavaVersion . current(). isJava9Compatible()) {
146
+ println " Java 9+: lowering MaxGCPauseMillis to 20ms in ${ project.name} ${ name} "
147
+ jvmArgs = [" -XX:MaxGCPauseMillis=20" ]
148
+ }
128
149
129
- tasks. named(" javadoc" ). configure {
130
- onlyIf { System . getenv(' SKIP_RELEASE' ) != " true" }
150
+ systemProperty(" java.awt.headless" , " true" )
151
+ systemProperty(" reactor.trace.cancel" , " true" )
152
+ systemProperty(" reactor.trace.nocapacity" , " true" )
153
+ systemProperty(" testGroups" , project. properties. get(" testGroups" ))
154
+ scanForTestClasses = false
155
+ exclude ' **/*Abstract*.*'
156
+
157
+ // allow re-run of failed tests only without special test tasks failing
158
+ // because the filter is too restrictive
159
+ filter. setFailOnNoMatchingTests(false )
160
+
161
+ // display intermediate results for special test tasks
162
+ afterSuite { desc , result ->
163
+ if (! desc. parent) { // will match the outermost suite
164
+ println (' \n ' + " ${ desc} Results: ${ result.resultType} (${ result.testCount} tests, ${ result.successfulTestCount} successes, ${ result.failedTestCount} failures, ${ result.skippedTestCount} skipped)" )
165
+ }
166
+ }
131
167
}
132
168
}
133
169
0 commit comments