Skip to content

Commit

Permalink
Add sonar task to build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
asteriskzie committed May 26, 2024
1 parent 22340e6 commit 94e6625
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
jacoco
id("org.springframework.boot") version "3.2.5"
id("io.spring.dependency-management") version "1.1.4"
id("org.sonarqube") version "5.0.0.4638"
}

group = "snackscription"
Expand Down Expand Up @@ -36,6 +37,14 @@ dependencies {
testImplementation("org.springframework.boot:spring-boot-starter-test")
}

sonar {
properties {
property("sonar.projectKey","ADPRO-C11_snackscription-review")
property("sonar.organization", "adpro-c11")
property("sonar.host.url", "https://sonarcloud.io")
}
}

tasks.register<Test>("unitTest") {
description = "Runs unit tests."
group = "verification"
Expand Down Expand Up @@ -74,6 +83,6 @@ tasks.jacocoTestReport {
reports {
xml.required.set(true)
csv.required.set(true)
// html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
}
}

0 comments on commit 94e6625

Please sign in to comment.