This message was deleted.
# configuration-cache
s
This message was deleted.
w
It works if the Lambda is serializable.
👍 1
v
lambda expressions can be serializable?
r
ah nice. though I wish gradle would take care of that 🙂
I switched it to use
Copy code
public interface SerializableFunction<T,R> extends Function<T,R>, Serializable {}
instead of
Function
but I still see the same error
w
That is strange, I saw it working just this week…
Can you show the changed code?
c
Sorry I don't see in the test where you set the lambda (additionalConfigToFiletree) I was thinking maybe the issue is that the lambda is using something from project or another object that is not serializable
v
Not the test sets it, but the task. First of the last three links:
private SerializableFunction<FileCollection, FileTree> additionalConfigToFileTree = FileCollection::getAsFileTree;
c
Yes, I was looking for the usage in the test to see if the issue was that the lambda had a reference to project
So it's just the default
r
the specific thing about that test in that test class compared to the other tests in that test class is that it invokes gradle twice so it actually tries to read the configuration-cache which failed
w
@René In your case, you also need to fix
CopyRestApiTask
and not only
CopyRestTestsTask
, and then it works: https://ge.gradle.org/s/p3caqd5ey6y4u/tests/overview
r
AH FUCK 😄
thanks stefan! 🤦‍♂️