Skip to content

Commit 24ac1bb

Browse files
authored
Added jacoco plugin.
1 parent 4786b75 commit 24ac1bb

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4141
SONAR_TOKEN: 19107c464b65c0769768d4564dd1c9b0c2822edd
42-
run: chmod +x gradlew && ./gradlew test koverXmlReport sonarqube -Dsonar.projectKey=javadev_LeetCode-in-Kotlin -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=javadev-github
42+
run: chmod +x gradlew && ./gradlew test jacocoTestReport sonarqube -Dsonar.projectKey=javadev_LeetCode-in-Kotlin -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=javadev-github --no-daemon
4343
- uses: codecov/codecov-action@v1
4444
with:
45-
file: ./**/build/reports/kover/project-xml/report.xml
45+
file: ./**/build/reports/jacoco/test/jacocoTestReport.xml
4646
name: codecov

build.gradle.kts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
kotlin("jvm") version "1.6.10"
3-
id("org.jetbrains.kotlinx.kover") version "0.5.0"
3+
jacoco
44
id("org.sonarqube") version "3.3"
55
id("com.diffplug.spotless") version "6.1.2"
66
`maven-publish`
@@ -50,12 +50,10 @@ spotless {
5050
}
5151
}
5252

53-
tasks.koverXmlReport {
54-
isEnabled = true
55-
}
56-
57-
sonarqube {
58-
properties {
59-
property("sonar.coverage.jacoco.xmlReportPaths", "build/reports/kover/project-xml/report.xml")
53+
tasks {
54+
jacocoTestReport {
55+
reports {
56+
xml.required.set(true)
6057
}
58+
}
6159
}

0 commit comments

Comments
 (0)