Skip to content

Commit

Permalink
chore: add sonarqube(cloud) dependency and setting
Browse files Browse the repository at this point in the history
YAF-65
  • Loading branch information
yesjjin99 committed Jan 14, 2025
1 parent 4f00bbe commit 5971f7b
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'org.springframework.boot' version '3.4.1'
id 'io.spring.dependency-management' version '1.1.7'
id 'jacoco'
id 'org.sonarqube' version '6.0.1.5171'
}

group = 'com.orbit'
Expand Down Expand Up @@ -51,6 +52,21 @@ jacoco {
toolVersion = '0.8.10'
}

sonar {
properties {
property "sonar.projectKey", "YAPP-Github_25th-App-Team-1-BE"
property "sonar.organization", "yapp-github"
property "sonar.host.url", "https://sonarcloud.io"
property 'sonar.sources', 'src'
property 'sonar.language', 'java'
property 'sonar.sourceEncoding', 'UTF-8'
property 'sonar.test.exclusions', '**/*Application*.java, **/*Controller*.java, **/config/**, **/dto/**, **/exception/**'
property 'sonar.test.inclusions', '**/*Test.java'
property 'sonar.java.coveragePlugin', 'jacoco'
property 'sonar.coverage.jacoco.xmlReportPaths', 'build/reports/jacoco/index.xml'
}
}

jacocoTestReport {
dependsOn test // test 종속성 추가

Expand All @@ -65,14 +81,12 @@ jacocoTestReport {

afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
fileTree(dir: it, excludes: [
'**/*Application*',
'**/*Controller*',
'**/config/*',
'**/dto/*',
'**/*Dto*',
'**/exception/*',
'**/*Exception*'
])
}))
}
Expand Down Expand Up @@ -104,9 +118,7 @@ jacocoTestCoverageVerification {
'**.*Controller*',
'**.config.*',
'**.dto.*',
'**.*Dto*',
'**.exception.*',
'**.*Exception*'
]
}
}
Expand Down

0 comments on commit 5971f7b

Please sign in to comment.