jenkinsci / gradle-jpi-plugin

Build Jenkins Plugins with Gradle
79 stars 50 forks source link

StackOverflowError on resolveTestDependencies in Gradle 7 #184

Closed sghill closed 3 years ago

sghill commented 3 years ago

Running the build with latest Gradle 7.0 snapshot (7.0-20210205134427+0000) fails several tests with this:

> Task :resolveTestDependencies FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':resolveTestDependencies'.
> java.lang.StackOverflowError (no error message)

Seems to be an issue with a subclassed Copy task calling super.copy. Here's the relevant part of the stacktrace:

at org.jenkinsci.gradle.plugins.jpi.TestDependenciesTask.copy(TestDependenciesTask.groovy:34)
at org.jenkinsci.gradle.plugins.jpi.TestDependenciesTask.copy(TestDependenciesTask.groovy:38)

In the Configuration Cache Userguide, there is an example of using the FileSystemOperations service instead. This service has been around since Gradle 6.0, so it seems like a good option here.