diff --git a/build.gradle.kts b/build.gradle.kts index 80f5ddc..20bcb2e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("org.springframework.boot") version "3.2.5" id("io.spring.dependency-management") version "1.1.4" jacoco + id("org.sonarqube") version "4.4.1.3373" } group = "snackscription" @@ -12,6 +13,7 @@ java { sourceCompatibility = JavaVersion.VERSION_21 } + configurations { compileOnly { extendsFrom(configurations.annotationProcessor.get()) @@ -56,4 +58,12 @@ tasks.jacocoTestReport { csv.required.set(false) html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml")) } +} + +sonar { + properties { + property("sonar.projectKey","ADPRO-C11_snackscription-review") + property("sonar.organization", "adpro-c11") + property("sonar.host.url", "https://sonarcloud.io") + } } \ No newline at end of file diff --git a/gradle/gradle.properties b/gradle/gradle.properties new file mode 100644 index 0000000..2b4c21a --- /dev/null +++ b/gradle/gradle.properties @@ -0,0 +1,5 @@ +systemProp.sonar.host.url=https://sonarcloud.io + +# Token generated from an account with 'Execute analysis' permission. +# It can also be set with the environment variable SONAR_TOKEN. +systemProp.sonar.token=${SONAR_TOKEN} \ No newline at end of file