Skip to content

Commit

Permalink
🔧 Add SonarQube configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurmfnsc committed Apr 8, 2024
1 parent bfa6f94 commit 8f967b7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ plugins {

id("io.spring.dependency-management") version "1.1.4"
id("org.openapi.generator") version "7.4.0" apply false
id("org.sonarqube") version "5.0.0.4638" apply false
id("org.springframework.boot") version "3.2.4"
}

apply(from = "plugins/java.gradle")
apply(from = "plugins/openapi.gradle")
apply(from = "plugins/sonarqube.gradle")

group = "com.arthurfnsc"
version = "0.0.1-SNAPSHOT"
Expand Down
15 changes: 15 additions & 0 deletions plugins/sonarqube.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apply plugin: "org.sonarqube"

sonarqube {
properties {
property "sonar.projectVersion", rootProject.version
property "sonar.token", System.getenv('SONAR_TOKEN')
property 'sonar.sourceEncoding', 'UTF-8'
property "sonar.scm.provider", "git"
property 'sonar.exclusions', 'build/**, **/*Test.*'
property "sonar.import_unknown_files", true
property 'sonar.core.codeCoveragePlugin', 'jacoco'
// SonarQube 6.2+
property 'sonar.coverage.jacoco.xmlReportPaths', "${project.projectDir}/build/reports/jacoco/test/jacocoTestReport.xml"
}
}

0 comments on commit 8f967b7

Please sign in to comment.