Remove logic related to jacoco coverage check.
MODIFY
gradle/jacoco.gradle
gradle/jacoco.gradle
@@ -12,57 +12,3 @@ tasks.named('jacocoTestReport').configure {
html.destination file("${buildDir}/reports/jacoco/")
}
}
-
-if (!project.ext.hasProperty("excludedClassesCoverage")) {
- project.ext.excludedClassesCoverage = []
-}
-
-if (!project.ext.hasProperty("excludedClassesBranchCoverage")) {
- project.ext.excludedClassesBranchCoverage = []
-}
-
-if (!project.ext.hasProperty("excludedClassesInstructionCoverage")) {
- project.ext.excludedClassesInstructionCoverage = []
-}
-
-// defaults can be overridden per project:
-project.ext.minimumBranchCoverage = 0.9
-project.ext.minimumInstructionCoverage = 0.9
-
-afterEvaluate {
- tasks.withType(Test).configureEach {
- jacoco {
- // Make sure that excluded classes do not get jacoco instrumentation applied since it may confuse apm agent in some cases
- excludes = project.excludedClassesCoverage
- }
- }
-
- jacocoTestCoverageVerification {
- violationRules {
- rule {
- element = 'CLASS'
- excludes = project.excludedClassesBranchCoverage + project.excludedClassesCoverage
- limit {
- counter = 'BRANCH'
- minimum = project.minimumBranchCoverage
- }
- }
-
- rule {
- element = 'CLASS'
- excludes = project.excludedClassesInstructionCoverage + project.excludedClassesCoverage
- limit {
- counter = 'INSTRUCTION'
- minimum = project.minimumInstructionCoverage
- }
- }
- }
- }
-
- tasks.named('jacocoTestCoverageVerification').configure {
- dependsOn('jacocoTestReport')
- }
- tasks.named('check').configure {
- dependsOn('jacocoTestCoverageVerification')
- }
-}

MODIFY
javaagent-api/javaagent-api.gradle
javaagent-api/javaagent-api.gradle
@@ -3,9 +3,6 @@ group = 'io.opentelemetry.javaagent'
apply plugin: "otel.java-conventions"
apply from: "$rootDir/gradle/publish.gradle"
-project.ext.minimumBranchCoverage = 0.0
-project.ext.minimumInstructionCoverage = 0.0
-
dependencies {
api "io.opentelemetry:opentelemetry-api"
compileOnly "io.opentelemetry:opentelemetry-sdk"

MODIFY
javaagent-bootstrap/javaagent-bootstrap.gradle
javaagent-bootstrap/javaagent-bootstrap.gradle
@@ -3,10 +3,6 @@ group = 'io.opentelemetry.javaagent'
apply plugin: "otel.java-conventions"
apply from: "$rootDir/gradle/publish.gradle"
-// FIXME: Improve test coverage.
-minimumBranchCoverage = 0.0
-minimumInstructionCoverage = 0.0
-
// patch inner class from Caffeine to avoid ForkJoinTask from being loaded too early
sourceSets {
patch {

MODIFY
javaagent-extension-api/javaagent-extension-api.gradle
javaagent-extension-api/javaagent-extension-api.gradle
@@ -3,10 +3,6 @@ group = 'io.opentelemetry.javaagent'
apply plugin: "otel.java-conventions"
apply from: "$rootDir/gradle/publish.gradle"
-// TODO this is not the desired state, only reflects current reality
-minimumBranchCoverage = 0
-minimumInstructionCoverage = 0
-
configurations {
// classpath used by the instrumentation muzzle plugin
instrumentationMuzzle {

MODIFY
javaagent-tooling/javaagent-tooling.gradle
javaagent-tooling/javaagent-tooling.gradle
@@ -3,10 +3,6 @@ group = 'io.opentelemetry.javaagent'
apply plugin: "otel.java-conventions"
apply from: "$rootDir/gradle/publish.gradle"
-// TODO this is not the desired state, only reflects current reality
-minimumBranchCoverage = 0
-minimumInstructionCoverage = 0
-
configurations {
// classpath used by the instrumentation muzzle plugin
instrumentationMuzzle {

Remove logic related to jacoco coverage check. (#3314)