You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jg...@apache.org on 2019/06/21 22:58:09 UTC
[kafka] branch 2.0 updated: MINOR: Disable scoverage in 2.0 (#6980)
This is an automated email from the ASF dual-hosted git repository.
jgus pushed a commit to branch 2.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.0 by this push:
new edc7e02 MINOR: Disable scoverage in 2.0 (#6980)
edc7e02 is described below
commit edc7e029c0199438fa2c399c39fd750d2b5c9af5
Author: Jason Gustafson <ja...@confluent.io>
AuthorDate: Fri Jun 21 15:57:54 2019 -0700
MINOR: Disable scoverage in 2.0 (#6980)
The scoverage plugin is causing the build to fail with recent versions of gradle. I see the following error:
```
* What went wrong:
A problem occurred evaluating root project 'kafka'.
> Failed to apply plugin [id 'org.scoverage']
> Could not create an instance of type org.scoverage.ScoverageExtension.
> You can't map a property that does not exist: propertyName=testClassesDir
```
This patch disables the plugin since we are not typically checking coverage for old branches anyway.
Reviewers: Ismael Juma <is...@juma.me.uk>
---
build.gradle | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/build.gradle b/build.gradle
index 42aabea..d15c22b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -26,7 +26,6 @@ buildscript {
// For Apache Rat plugin to ignore non-Git files
classpath "org.ajoberstar:grgit:1.9.3"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
- classpath 'org.scoverage:gradle-scoverage:2.3.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
classpath 'org.owasp:dependency-check-gradle:3.1.2'
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.10.0"
@@ -402,13 +401,12 @@ subprojects {
}
}
- def coverageGen = it.path == ':core' ? 'reportScoverage' : 'jacocoTestReport'
- task reportCoverage(dependsOn: [coverageGen])
-
+ def coverageGen = it.path == ':core' ? [] : ['jacocoTestReport']
+ task reportCoverage(dependsOn: coverageGen)
}
gradle.taskGraph.whenReady { taskGraph ->
- taskGraph.getAllTasks().findAll { it.name.contains('findbugsScoverage') || it.name.contains('findbugsTest') }.each { task ->
+ taskGraph.getAllTasks().findAll { it.name.contains('findbugsTest') }.each { task ->
task.enabled = false
}
}
@@ -544,7 +542,6 @@ project(':core') {
println "Building project 'core' with Scala version ${versions.scala}"
apply plugin: 'scala'
- apply plugin: "org.scoverage"
archivesBaseName = "kafka_${versions.baseScala}"
dependencies {
@@ -586,20 +583,8 @@ project(':core') {
testCompile libs.scalatest
testCompile libs.slf4jlog4j
testCompile libs.jfreechart
-
- scoverage libs.scoveragePlugin
- scoverage libs.scoverageRuntime
}
- scoverage {
- reportDir = file("${rootProject.buildDir}/scoverage")
- highlighting = false
- }
- checkScoverage {
- minimumRate = 0.0
- }
- checkScoverage.shouldRunAfter('test')
-
configurations {
// manually excludes some unnecessary dependencies
compile.exclude module: 'javax'