Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Update build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
otavio-code authored Nov 28, 2024
1 parent a7c0ea2 commit 758d149
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id 'io.spring.dependency-management' version '1.1.6'
id 'com.diffplug.spotless' version '6.25.0'
id 'pmd'
id 'org.jetbrains.kotlinx.kover' version '0.7.3'
id 'jacoco'
}

group = 'br.com.fiap.grupo30.fastfood'
Expand Down Expand Up @@ -66,33 +66,13 @@ tasks.named('test') {
useJUnitPlatform()
}

kover {
// Gera os relatórios de cobertura em XML e HTML
xmlReport {
onCheck = true // Valida cobertura automaticamente no 'check'
}
verify {
rule {
name = "Minimum code coverage"
bound {
minValue = 50.0 // Define o mínimo de cobertura exigido
}
}
}
filters {
classes {
includes += ["br.com.fiap.grupo30.fastfood.*"] // Incluir os pacotes corretos
}
}
jacoco {
toolVersion = "0.8.10" // Ou a versão mais recente
}

sourceSets {
test {
resources {
srcDirs = ["src/test/java/br/com/fiap/grupo30/products_api"]
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(true)
}
}


tasks.check.dependsOn("koverXmlReport", "koverHtmlReport") // Garante que os relatórios sejam gerados no check

0 comments on commit 758d149

Please sign in to comment.