added sonarqube config #41
@@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
|
jacoco
|
||||||
id("org.springframework.boot") version "4.1.0"
|
id("org.springframework.boot") version "4.1.0"
|
||||||
id("io.spring.dependency-management") version "1.1.7"
|
id("io.spring.dependency-management") version "1.1.7"
|
||||||
id("org.sonarqube") version "7.3.0.8198"
|
id("org.sonarqube") version "7.3.0.8198"
|
||||||
@@ -18,6 +19,8 @@ sonar {
|
|||||||
properties {
|
properties {
|
||||||
property("sonar.projectKey", "Vaessl")
|
property("sonar.projectKey", "Vaessl")
|
||||||
property("sonar.projectName", "Vaessl")
|
property("sonar.projectName", "Vaessl")
|
||||||
|
property("sonar.coverage.jacoco.xmlReportPaths",
|
||||||
|
"${layout.buildDirectory.get()}/reports/jacoco/test/jacocoTestReport.xml")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,14 +65,9 @@ tasks.withType<JavaCompile> {
|
|||||||
options.compilerArgs.add("-parameters")
|
options.compilerArgs.add("-parameters")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<Test> {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<Test> {
|
tasks.withType<Test> {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
|
finalizedBy(tasks.jacocoTestReport)
|
||||||
// log exact test failures, standard out, and errors in CI
|
|
||||||
testLogging {
|
testLogging {
|
||||||
events("failed", "standardError")
|
events("failed", "standardError")
|
||||||
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
|
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
|
||||||
@@ -78,3 +76,10 @@ tasks.withType<Test> {
|
|||||||
showStackTraces = true
|
showStackTraces = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.jacocoTestReport {
|
||||||
|
dependsOn(tasks.withType<Test>())
|
||||||
|
reports {
|
||||||
|
xml.required = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user