From 057cbd6bb92d25cf926ef48fe092703c4aba18c6 Mon Sep 17 00:00:00 2001 From: Janis Date: Sun, 22 Mar 2026 21:07:11 +0100 Subject: [PATCH] build: add SonarQube configuration for code quality analysis --- build.gradle.kts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 7938926..9f5ab64 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,27 @@ +plugins { + id("org.sonarqube") version "7.2.3.7755" +} + group = "de.nowchess" version = "1.0-SNAPSHOT" +sonar { + properties { + property("sonar.projectKey", "Now-Chess-Systems") + property("sonar.projectName", "Now-Chess Systems") + property("sonar.host.url", "https://sonar.janis-eccarius.de") + property("sonar.token", System.getenv("SONAR_TOKEN")) + property("sonar.branch.name", System.getenv("GIT_BRANCH") ?: "main") + + val scoverageReports = subprojects.mapNotNull { subproject -> + val report = subproject.file("build/reports/scoverageTest/scoverage.xml") + if (report.exists()) report.absolutePath else null + }.joinToString(",") + + property("sonar.scala.coverage.reportPaths", scoverageReports) + } +} + val versions = mapOf( "QUARKUS_SCALA3" to "1.0.0", "SCALA3" to "3.5.1",