Skip to content

Commit

Permalink
fix: code coverage report generation
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Jul 3, 2024
1 parent 5420749 commit 2aa88bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Fix problem where code coverage report couldn't be generated.

## [0.14.2] - 2024-06-29

### Fixed
Expand Down
12 changes: 4 additions & 8 deletions helper.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -319,24 +319,20 @@ tasks.register('allJavadoc', Javadoc) {
destinationDir = file("build/docs/javadoc")
}

// https://web.archive.org/web/20200206112725/http://csiebler.github.io/blog/2014/02/09/multi-project-code-coverage-using-gradle-and-jacoco/
tasks.register('codeCoverageReport', JacocoReport) {
dependsOn tasks.withType(Test)
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
subprojects.each {
sourceSets it.sourceSets.main
it.tasks.withType(Test).each {
executionData it
dependsOn it
}
}
reports {
html.required = true
xml.required = true
}
}

// always run the tests before generating the report
codeCoverageReport.dependsOn {
subprojects*.test
}

ext.enableSonarQube = (String projectKey, String organization = "refinedmods") -> {
apply plugin: org.sonarqube.gradle.SonarQubePlugin
// https://docs.sonarqube.org/latest/analysis/github-integration/
Expand Down

0 comments on commit 2aa88bd

Please sign in to comment.