Update build.gradle

This commit is contained in:
Ludy87 2025-08-09 13:51:46 +02:00
parent c2d0b97ea1
commit 71b106d7e1
No known key found for this signature in database
GPG Key ID: 92696155E0220F94

View File

@ -69,7 +69,7 @@ allprojects {
tasks.register('writeVersion', WriteProperties) { tasks.register('writeVersion', WriteProperties) {
outputFile = layout.projectDirectory.file('app/common/src/main/resources/version.properties') outputFile = layout.projectDirectory.file('app/common/src/main/resources/version.properties')
println "Writing version.properties to ${outputFile.path}" println "Writing version.properties to ${outputFile.path}"
comment "${new Date()}" comment = "${new Date()}"
property 'version', project.provider { project.version.toString() } property 'version', project.provider { project.version.toString() }
} }
@ -128,6 +128,9 @@ subprojects {
testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.mockito:mockito-inline:5.2.0' testRuntimeOnly 'org.mockito:mockito-inline:5.2.0'
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junitPlatformVersion" testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"
testImplementation platform("com.squareup.okhttp3:okhttp-bom:5.1.0")
testImplementation "com.squareup.okhttp3:mockwebserver"
} }
tasks.withType(JavaCompile).configureEach { tasks.withType(JavaCompile).configureEach {
@ -153,6 +156,17 @@ subprojects {
} }
} }
jacocoTestCoverageVerification {
dependsOn jacocoTestReport
violationRules {
rule {
limit {
minimum = 0.0
}
}
}
}
tasks.named("processResources") { tasks.named("processResources") {
dependsOn(rootProject.tasks.writeVersion) dependsOn(rootProject.tasks.writeVersion)
} }
@ -569,6 +583,9 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junitPlatformVersion" testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"
testImplementation platform("com.squareup.okhttp3:okhttp-bom:5.1.0")
testImplementation "com.squareup.okhttp3:mockwebserver"
} }
tasks.named("test") { tasks.named("test") {