Skip to content

Commit 4ec38fd

Browse files
committed
Update Sonar configuration
1 parent fa29a9b commit 4ec38fd

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/pull-request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
run: gradlew --info check
5252
build:
5353
name: Sonar analysis
54+
needs: validation
5455
runs-on: ubuntu-latest
5556
steps:
5657
- uses: actions/checkout@v2

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,21 @@ plugins {
3838
id "com.jfrog.artifactory" version "4.11.0" apply false
3939
id "biz.aQute.bnd.builder" version "5.1.2" apply false
4040
id "org.sonarqube" version "3.0"
41+
id "jacoco"
4142
}
4243

4344
sonarqube {
4445
properties {
4546
property "sonar.projectKey", "graphql-java-kickstart_graphql-java-servlet"
4647
property "sonar.organization", "graphql-java-kickstart"
4748
property "sonar.host.url", "https://sonarcloud.io"
49+
property "sonar.coverage.jacoco.xmlReportPaths", "$projectDir/*/build/reports/jacoco/test/jacocoTestReport.xml"
4850
}
4951
}
5052

5153
subprojects {
5254
apply plugin: 'idea'
55+
apply plugin: 'jacoco'
5356
apply plugin: 'java'
5457
apply plugin: 'maven-publish'
5558
apply plugin: "com.jfrog.bintray"
@@ -84,6 +87,13 @@ subprojects {
8487
sha256 = ""
8588
}
8689

90+
jacocoTestReport {
91+
reports {
92+
xml.enabled = true
93+
html.enabled = false
94+
csv.enabled = false
95+
}
96+
}
8797

8898
if (!it.name.startsWith('example')) {
8999

0 commit comments

Comments
 (0)