From 8441c55024a92a317391caf7effc659385c76646 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 17 Nov 2021 12:30:57 -0800 Subject: [PATCH] Upgrade to Jacoco 0.8.7. Jacoco 0.8.7 includes experimental support for Java 17 and is required to run on Java 17. https://www.jacoco.org/jacoco/trunk/doc/changes.html. --- .../groovy/io/spring/gradle/convention/JacocoPlugin.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/io/spring/gradle/convention/JacocoPlugin.groovy b/buildSrc/src/main/groovy/io/spring/gradle/convention/JacocoPlugin.groovy index 900cf9f..d22d943 100644 --- a/buildSrc/src/main/groovy/io/spring/gradle/convention/JacocoPlugin.groovy +++ b/buildSrc/src/main/groovy/io/spring/gradle/convention/JacocoPlugin.groovy @@ -13,7 +13,6 @@ * License for the specific language governing permissions and limitations under * the License. */ - package io.spring.gradle.convention import org.gradle.api.Plugin @@ -29,12 +28,14 @@ class JacocoPlugin implements Plugin { @Override void apply(Project project) { + project.plugins.withType(JavaPlugin) { + project.getPluginManager().apply("jacoco") project.tasks.check.dependsOn project.tasks.jacocoTestReport project.jacoco { - toolVersion = '0.8.2' + toolVersion = '0.8.7' } } }