Skip to content

Commit

Permalink
Enable Jacoco coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rashidi committed Dec 21, 2024
1 parent fc55942 commit 9921fe8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
38 changes: 21 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,9 @@ repositories {
}

dependencies {
implementation project(':batch-rest-repository')
implementation project(':batch-skip-step')
implementation project(':data-domain-events')
implementation project(':data-envers-audit')
implementation project(':data-jpa-audit')
implementation project(':data-jpa-event')
implementation project(':data-jpa-filtered-query')
implementation project(':data-mongodb-audit')
implementation project(':data-mongodb-full-text-search')
implementation project(':data-mongodb-tc-data-load')
implementation project(':data-mongodb-transactional')
implementation project(':data-rest-validation')
implementation project(':graphql')
implementation project(':jooq')
implementation project(':test-execution-listeners')
implementation project(':test-rest-assured')

subprojects.forEach { p -> {
implementation project(":${p.name}")
}}
}

dependencyManagement {
Expand All @@ -47,10 +33,28 @@ dependencyManagement {
}
}

reporting {
reports {
testCodeCoverageReport(JacocoCoverageReport) {
testType = TestSuiteType.UNIT_TEST
}
}
}

sonar {
properties {
property "sonar.projectKey", "rashidi_spring-boot-tutorials"
property "sonar.organization", "rashidi-github"
property "sonar.host.url", "https://sonarcloud.io"
}
}

subprojects {
apply {
plugin('jacoco')
}
}

tasks.named('check') {
dependsOn tasks.named('testCodeCoverageReport', JacocoReport)
}
8 changes: 2 additions & 6 deletions cloud-jdbc-env-repo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ ext {
}

dependencies {
implementation platform("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}")

implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
implementation 'org.springframework.cloud:spring-cloud-config-server'
Expand All @@ -39,12 +41,6 @@ dependencies {
testImplementation 'org.testcontainers:mysql'
}

dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}

tasks.named('test') {
useJUnitPlatform()
}

0 comments on commit 9921fe8

Please sign in to comment.