Skip to content

Instantly share code, notes, and snippets.

@sw-samuraj
Last active November 1, 2017 21:19
Show Gist options
  • Save sw-samuraj/b005831405c83e2903d452d784ce11e6 to your computer and use it in GitHub Desktop.
Save sw-samuraj/b005831405c83e2903d452d784ce11e6 to your computer and use it in GitHub Desktop.
A minimalistic Gradle configuration for Sonar with JaCoCo and JUnit 5.
apply plugin: 'org.sonarqube'
ext {
sonarProjectName = 'blog-junit5-gradle'
sonarProjectKey = 'cz.swsamuraj.junit5.gradle'
jacocoDestinationFile = "${buildDir}/jacoco/test.exec"
jacocoExclusions = ['**/Main*']
}
sonarqube {
properties {
property 'sonar.projectKey', sonarProjectKey
property 'sonar.projectName', sonarProjectName
property 'sonar.jacoco.reportPath', jacocoDestinationFile
property 'sonar.coverage.exclusions', jacocoExclusions
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment