@@ -13,7 +13,7 @@ plugins {
13
13
id ' com.github.kt3k.coveralls' version ' 2.12.0'
14
14
}
15
15
16
- repositories {
16
+ repositories {
17
17
// https://stackoverflow.com/questions/36029754/force-gradle-to-use-http-instead-of-https
18
18
// https://discuss.gradle.org/t/how-to-change-gradle-plugin-portal-from-https-to-http/10847/12
19
19
mavenLocal()
@@ -66,7 +66,7 @@ eclipse.jdt.file.withProperties { props ->
66
66
// gradle support from JUnit5 team that we removed after gradle native support for JUnit5: http://junit.org/junit5/docs/current/user-guide/#running-tests-build-gradle
67
67
test {
68
68
jvmArgs ' --enable-preview'
69
-
69
+
70
70
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html
71
71
// Enable JUnit 5 (Gradle 4.6+).
72
72
useJUnitPlatform {
@@ -92,9 +92,9 @@ dependencies {
92
92
// testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
93
93
// Only needed to run tests in an (IntelliJ) IDE(A) that bundles an older version
94
94
// testRuntimeOnly("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
95
-
95
+
96
96
// To avoid compiler warnings about @API annotations in JUnit code
97
- testCompileOnly(' org.apiguardian:apiguardian-api:1.1.1 ' )
97
+ testCompileOnly(' org.apiguardian:apiguardian-api:1.1.2 ' )
98
98
implementation(' org.apiguardian:apiguardian-api:1.0.0' )
99
99
100
100
// To use Log4J's LogManager
@@ -152,13 +152,13 @@ afterEvaluate {
152
152
def jacocoJupTestReportTask = project. tasks. getByName(' jacocoJupTestReport' )
153
153
reportPath = " ${ buildDir} /reports/jacoco/report.xml"
154
154
reportSourceSets = files(jacocoJupTestReportTask. sourceDirectories. collect{ it. listFiles() }. flatten())
155
- }
155
+ }
156
156
}
157
157
158
158
// https://github.com/ben-manes/caffeine/blob/master/build.gradle
159
159
coveralls {
160
160
jacocoReportPath = " ${ buildDir} /reports/jacoco/report.xml"
161
- }
161
+ }
162
162
163
163
// https://github.com/codeclimate/test-reporter/issues/243
164
164
// task jacocoFixForCodeClimate(type: Copy) {
@@ -172,7 +172,7 @@ coveralls {
172
172
173
173
// https://stackoverflow.com/questions/3963708/gradle-how-to-display-test-results-in-the-console-in-real-time
174
174
tasks. withType(Test ) {
175
- testLogging {
175
+ testLogging {
176
176
// set options for log level LIFECYCLE
177
177
events TestLogEvent . FAILED ,
178
178
// TestLogEvent.PASSED,
@@ -198,14 +198,14 @@ tasks.withType(Test) {
198
198
}
199
199
info. events = debug. events
200
200
info. exceptionFormat = debug. exceptionFormat
201
-
201
+
202
202
afterSuite { desc , result ->
203
- if (! desc. parent) { // will match the outermost suite
203
+ if (! desc. parent) { // will match the outermost suite
204
204
def output = " Results: ${ result.resultType} (${ result.testCount} tests, ${ result.successfulTestCount} successes, ${ result.failedTestCount} failures, ${ result.skippedTestCount} skipped)"
205
205
def startItem = ' | ' , endItem = ' |'
206
206
def repeatLength = startItem. length() + output. length() + endItem. length()
207
207
println (' \n ' + (' -' * repeatLength) + ' \n ' + startItem + output + endItem + ' \n ' + (' -' * repeatLength))
208
208
}
209
209
}
210
210
}
211
- }
211
+ }
0 commit comments