@@ -4,21 +4,17 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
4
4
buildscript {
5
5
repositories {
6
6
mavenCentral()
7
- jcenter()
8
- }
9
- dependencies {
10
- classpath ' org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.3'
11
7
}
12
8
}
13
9
14
10
plugins {
15
- id " org.sonarqube" version " 3.1.1"
11
+ id " org.sonarqube" version " 3.1.1"
12
+ id " com.github.nbaztec.coveralls-jacoco" version " 1.2.12"
16
13
}
17
14
18
15
repositories {
19
16
// https://stackoverflow.com/questions/36029754/force-gradle-to-use-http-instead-of-https
20
17
// https://discuss.gradle.org/t/how-to-change-gradle-plugin-portal-from-https-to-http/10847/12
21
- jcenter()
22
18
mavenLocal()
23
19
mavenCentral()
24
20
}
@@ -32,7 +28,6 @@ ext.log4jVersion = '2.14.1'
32
28
apply plugin : ' java'
33
29
apply plugin : ' eclipse'
34
30
apply plugin : ' application'
35
- apply plugin : ' com.github.kt3k.coveralls'
36
31
37
32
// https://stackoverflow.com/questions/46233314/gradle-android-jacoco-and-junit5
38
33
apply plugin : ' jacoco'
@@ -151,8 +146,16 @@ afterEvaluate {
151
146
}
152
147
153
148
check. dependsOn jacocoJupTestReport
149
+
150
+ coverallsJacoco {
151
+ def jacocoJupTestReportTask = project. tasks. getByName(' jacocoJupTestReport' )
152
+ reportPath = " ${ buildDir} /reports/jacoco/report.xml"
153
+ reportSourceSets = files(jacocoJupTestReportTask. sourceDirectories. collect{ it. listFiles() }. flatten())
154
+ }
154
155
}
155
156
157
+ // https://github.com/ben-manes/caffeine/blob/master/build.gradle
158
+
156
159
// https://github.com/codeclimate/test-reporter/issues/243
157
160
// task jacocoFixForCodeClimate(type: Copy) {
158
161
// from 'build/reports/jacoco/report.xml'
@@ -163,11 +166,6 @@ afterEvaluate {
163
166
// filter { line -> line.replaceAll("com/", "webapp/src/main/java/com/") }
164
167
// }
165
168
166
- // https://github.com/ben-manes/caffeine/blob/master/build.gradle
167
- coveralls {
168
- jacocoReportPath = " ${ buildDir} /reports/jacoco/report.xml"
169
- }
170
-
171
169
// https://stackoverflow.com/questions/3963708/gradle-how-to-display-test-results-in-the-console-in-real-time
172
170
tasks. withType(Test ) {
173
171
testLogging {
0 commit comments