mirror of
https://github.com/apache/lucene.git
synced 2025-02-10 12:05:36 +00:00
GITHUB#12655: upgrade jacoco aggregation plugin (failed with gradle 8.x), change html output property.
This commit is contained in:
parent
4ac2f435aa
commit
4533dcea4e
@ -26,7 +26,7 @@ plugins {
|
|||||||
id "de.undercouch.download" version "5.2.0" apply false
|
id "de.undercouch.download" version "5.2.0" apply false
|
||||||
id "net.ltgt.errorprone" version "3.1.0" apply false
|
id "net.ltgt.errorprone" version "3.1.0" apply false
|
||||||
id 'com.diffplug.spotless' version "6.5.2" apply false
|
id 'com.diffplug.spotless' version "6.5.2" apply false
|
||||||
id 'org.barfuin.gradle.jacocolog' version "2.0.0" apply false
|
id 'org.barfuin.gradle.jacocolog' version "3.1.0" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: file('gradle/globals.gradle')
|
apply from: file('gradle/globals.gradle')
|
||||||
|
@ -23,6 +23,21 @@ def withCoverage = gradle.startParameter.taskNames.contains("coverage") ||
|
|||||||
Boolean.parseBoolean(propertyOrDefault("tests.coverage", "false"))
|
Boolean.parseBoolean(propertyOrDefault("tests.coverage", "false"))
|
||||||
|
|
||||||
if (withCoverage) {
|
if (withCoverage) {
|
||||||
|
configure(rootProject) {
|
||||||
|
plugins.apply("org.barfuin.gradle.jacocolog")
|
||||||
|
|
||||||
|
// Synthetic task to enable test coverage (and aggregated reports).
|
||||||
|
task coverage() {
|
||||||
|
dependsOn jacocoAggregatedReport
|
||||||
|
}
|
||||||
|
|
||||||
|
configure(jacocoAggregatedReport) {
|
||||||
|
doLast {
|
||||||
|
logger.lifecycle("Code coverage report at: ${reports.html.entryPoint}\n")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
plugins.withType(JavaPlugin) {
|
plugins.withType(JavaPlugin) {
|
||||||
// Apply jacoco once we know the project has a Java plugin too.
|
// Apply jacoco once we know the project has a Java plugin too.
|
||||||
@ -47,7 +62,7 @@ if (withCoverage) {
|
|||||||
|
|
||||||
configure(jacocoTestReport) {
|
configure(jacocoTestReport) {
|
||||||
doLast {
|
doLast {
|
||||||
logger.lifecycle("Code coverage report at: ${reports.html.destination}.\n")
|
logger.lifecycle("Code coverage report at: ${reports.html.entryPoint}.\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user