From 93971163210451278e7c1c5e1db10aa030b3a8c6 Mon Sep 17 00:00:00 2001 From: Travis Date: Tue, 15 Sep 2026 16:44:57 +0000 Subject: [PATCH] Build: add a project-specific SonarQube scan Configures the org.sonarqube plugin so each spring-* sub-module is analyzed as its own SonarQube project keyed org.springframework:, rather than as a single aggregated scan of the whole build. Each module's configuration lives in its own build file so it can be reviewed and merged independently. Server URL and token are read from the SONAR_HOST_URL and SONAR_TOKEN environment variables rather than being hardcoded. --- spring-tx/spring-tx.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spring-tx/spring-tx.gradle b/spring-tx/spring-tx.gradle index 6db53d15a7de..f51b427d4c83 100644 --- a/spring-tx/spring-tx.gradle +++ b/spring-tx/spring-tx.gradle @@ -1,3 +1,7 @@ +plugins { + id 'org.sonarqube' version '7.4.0.8496' +} + description = "Spring Transaction" apply plugin: "kotlin" @@ -26,3 +30,13 @@ dependencies { testImplementation("io.projectreactor:reactor-test") testImplementation("jakarta.persistence:jakarta.persistence-api") } + +// This module is analyzed as its own SonarQube project. +sonar { + properties { + property 'sonar.projectKey', 'org.springframework:spring-tx' + property 'sonar.projectName', 'Spring Transaction' + property 'sonar.projectVersion', project.version + property 'sonar.sourceEncoding', 'UTF-8' + } +}