Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GradleV2 fails with JaCoCo on multiproject build #14130

Closed
gnegnegne opened this issue Dec 23, 2020 · 2 comments
Closed

GradleV2 fails with JaCoCo on multiproject build #14130

gnegnegne opened this issue Dec 23, 2020 · 2 comments
Assignees
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug Task: Gradle

Comments

@gnegnegne
Copy link

Question, Bug, or Feature?
Type: Bug

Enter Task Name: GradleV2

Environment

  • Server - Azure Pipelines or TFS on-premises?

    • Azure Pipelines
  • Agent - Hosted or Private:

    • Self Hosted Agent on Windows 10, agent version 2.174.3

Issue Description

Gradle task fails on multi project with JaCoCo enabled, error caused by set of a readonly property. The problem seems related to a missing fix from the c99aa3b

That commit didn't fix the line 24:

classDirectories = fileTree(dir: "${classFileDirectory}").exclude(jacocoExcludes).include(jacocoIncludes)

could you confirm that it is related @anatolybolshakov ?

Task logs

  • What went wrong:
    Execution failed for task ':platform-app:jacocoTestReport'.
    Cannot set the value of read-only property 'classDirectories' for task ':platform-app:jacocoTestReport' of type org.gradle.testing.jacoco.tasks.JacocoReport.

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

> Task :platform-app:distZip
> Task :platform-app:shadowJar
> Task :platform-app:startShadowScripts
> Task :platform-app:shadowDistTar
> Task :platform-app:shadowDistZip
> Task :platform-app:assemble
> Task :platform-app:compileTestJava
> Task :platform-app:processTestResources NO-SOURCE
> Task :platform-app:testClasses
> Task :platform-app:test
> Task :platform-app:jacocoTestReport
FAILURE: Build failed with an exception. FAILED


* Where:
Build file 'C:\agent\_work\4\s\build.gradle' line: 24

* What went wrong:
Execution failed for task ':platform-app:jacocoTestReport'.
> Cannot set the value of read-only property 'classDirectories' for task ':platform-app:jacocoTestReport' of type org.gradle.testing.jacoco.tasks.JacocoReport.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
21 actionable tasks: 18 executed, 3 up-to-date


* Get more help at https://help.gradle.org

BUILD FAILED in 1m 23s
@anatolybolshakov
Copy link
Contributor

Hi @gnegnegne we have rolled out related changes - you can set 'gradle5xOrHigher' currently - to signalize that you use Gradle >= 5.x if there is JaCoCo code coverage enabled.

@anatolybolshakov
Copy link
Contributor

Let me close it at the moment since it's resolved - please let us know if you have any further questions!

@anatolybolshakov anatolybolshakov removed the awaiting deployment Related changes are waiting for deployment to be completed label Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug Task: Gradle
Projects
None yet
Development

No branches or pull requests

2 participants