Skip to content

Commit

Permalink
Add sonar 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 3318010 commit fd3d606
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions 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 All @@ -27,16 +28,23 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("io.micrometer:micrometer-core")
compileOnly("org.projectlombok:lombok")
developmentOnly("org.springframework.boot:spring-boot-devtools")
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.projectlombok:lombok")
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 @@ -75,5 +83,6 @@ tasks.jacocoTestReport {
reports {
xml.required.set(true)
csv.required.set(true)
html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
}
}

0 comments on commit fd3d606

Please sign in to comment.