Skip to content

Commit

Permalink
ci: updated sonar settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ennioVisco committed Jul 13, 2023
1 parent 2d5fdf4 commit e3e590b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
`java-library`
java
jacoco
`jacoco-report-aggregation`
id("org.sonarqube")
}

Expand Down Expand Up @@ -49,7 +50,7 @@ tasks.test {

tasks.jacocoTestReport.configure {
// Do not generate reports for individual projects
enabled = false
enabled = true
}

tasks.register<Copy>("copyDependencies") {
Expand All @@ -60,6 +61,11 @@ tasks.register<Copy>("copyJar") {
from(tasks.jar).into("$buildDir/jmods")
}

// Make JaCoCo report generation part of the 'check' lifecycle phase
tasks.check {
dependsOn(tasks.named<JacocoReport>("testCodeCoverageReport"))
}

// == Sonarqube settings ==
sonar {
// TODO: change project key with `project.name` when sonarcloud is properly configured
Expand Down
17 changes: 8 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ plugins {
}

// == Umbrella task to publishing all publishable packages ==
// TODO: ideally we should have separate packages:
// 1. api/console
// 2. engine/core
// 3. script
// 4. matlab
tasks.register<Copy>("release") {
dependsOn("console:release")
}
Expand All @@ -29,12 +24,16 @@ tasks.register("analyze") {
dependsOn("sonar")
}

tasks.check {
dependsOn("engine:check")
}

dependencies {
// Transitively collect coverage data from all features and their dependencies
jacocoAggregation(project(":console"))
jacocoAggregation(project(":engine"))
jacocoAggregation(project(":script"))
jacocoAggregation(project(":matlab"))
// jacocoAggregation(project(":console"))
// jacocoAggregation(project(":engine"))
// jacocoAggregation(project(":script"))
// jacocoAggregation(project(":matlab"))

// TODO: add examples, etc.
}
Expand Down

0 comments on commit e3e590b

Please sign in to comment.