From 94e66252f627add4382acead1ccb675fbaaa31a0 Mon Sep 17 00:00:00 2001 From: asteriskzie Date: Sun, 26 May 2024 10:26:39 +0700 Subject: [PATCH] Add sonar task to build.gradle.kts --- build.gradle.kts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 329c4e3..f1016f9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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" @@ -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("unitTest") { description = "Runs unit tests." group = "verification" @@ -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")) } } \ No newline at end of file