From 195f80fa6b2dc4636f6a0bee73589cedb9be4a0b 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-test/spring-test.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index 58284a65fd37..4b70c1d1586a 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -1,3 +1,7 @@ +plugins { + id 'org.sonarqube' version '7.4.0.8496' +} + description = "Spring TestContext Framework" apply plugin: "kotlin" @@ -119,3 +123,13 @@ test { // Optionally configure Java Util Logging for the JUnit Platform. // systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager") } + +// This module is analyzed as its own SonarQube project. +sonar { + properties { + property 'sonar.projectKey', 'org.springframework:spring-test' + property 'sonar.projectName', 'Spring TestContext Framework' + property 'sonar.projectVersion', project.version + property 'sonar.sourceEncoding', 'UTF-8' + } +}