1

I'm using Gradle as a build tool and I face an error in the jacocoTestReport task.

I run my pipeline in Azure DevOps following this documentation:

https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/build/gradle?view=azure-devops

I have no idea what may cause this issue.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':jacocoTestReport'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:98)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:68)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)

Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method setFrom() for arguments [directory 'build/classes/main/'] on main classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.
    at org.gradle.internal.metaobject.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:182)
    at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:167)
    at org.gradle.api.internal.tasks.DefaultSourceSetOutput_Decorated.invokeMethod(Unknown Source)

In my gradle.build file I have only:

apply plugin: 'jacoco'
Rostislav V
  • 1,706
  • 1
  • 19
  • 31
  • Hi, Could you share the detail log and pipeline definition here? "face an error in the jacocoTestReport task" I cannot find the task jacocoTestReport. By the way, please also check this [ticket](https://stackoverflow.com/questions/34958886/gradle-could-not-find-method-compile-for-arguments) – Vito Liu Dec 21 '20 at 08:26

0 Answers0