以下错误导致jenkins构建失败。
> Task :jacocoTestReport FAILED
Caching disabled for task ':jacocoTestReport' because:
Build cache is disabled
Task ':jacocoTestReport' is not up-to-date because:
Task has failed previously.
[ant:jacocoReport] Loading execution data file C:\Users\*\build\jacoco\test.exec
:jacocoTestReport (Thread[Execution worker for ':',5,main]) completed. Took 0.702 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':jacocoTestReport'.
> Error while creating report
最佳答案
请参阅documentation:您必须将org.gradle.caching=true
添加到文件gradle.properties
中。
然后再次构建整个项目,这样就可以缓存上一个任务的输出。