diff-coverage-gradle icon indicating copy to clipboard operation
diff-coverage-gradle copied to clipboard

Gradle 7.4 - Execution optimizations have been disabled for task ':diffCoverage'

Open NicklasWallgren opened this issue 2 years ago • 3 comments

> Task :diffCoverage
Execution optimizations have been disabled for task ':diffCoverage' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '<PATH>/build/classes/java/main'. Reason: Task ':diffCoverage' uses this output of task ':compileJava' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: '<PATH>/build/jacoco/test.exec'. Reason: Task ':diffCoverage' uses this output of task ':test' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: '<PATH>/build/resources/main'. Reason: Task ':diffCoverage' uses this output of task ':processResources' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Fail on violations: false. Found violations: 0.

NicklasWallgren avatar Mar 04 '22 10:03 NicklasWallgren

Hi @NicklasWallgren

What version of Diff-Coverage plugin do you use?

SurpSG avatar Mar 07 '22 09:03 SurpSG

@SurpSG Hey, we are running com.github.form-com.diff-coverage-gradle:diff-coverage:0.9.0

buildscript {
    repositories {
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath 'com.github.form-com.diff-coverage-gradle:diff-coverage:0.9.0'
    }
}

apply plugin: 'com.form.diff-coverage'

diffCoverageReport {
    diffSource {
        git.compareWith 'refs/remotes/origin/master'
    }

    reports {
        html = true
    }
}
./gradlew test diffCoverage

NicklasWallgren avatar Mar 07 '22 10:03 NicklasWallgren

A quick fix:

diffCoverage.dependsOn test

Currently, I'm investigating other solutions. I have an idea how it could fixed inside the plugin.

SurpSG avatar Mar 18 '22 20:03 SurpSG