This message was deleted.
# community-support
s
This message was deleted.
m
you can add a
provider<File>
to a
ConfigurableFileCollection
e.g
myFiles.from(providers.provider { someFile })
v
Or in other words, that collection already is part of the lazy API, no need for a replacement
👆 1
a
Yes, as other said, normally you should just use
ConfigurableFileCollection
no need for Provider
j
myFiles.from(providers.provider { someFile })
this is not working as expected in my case as I was already doing that
inside
provider { ... }
I was picking up the kotlin source sets lazily, they were null. After moving to
Provider<Set<File>>
it started to work
I think it is doing internally a
get()
before it should do that
Another issue I have seen with that API it is not intuitive to understand what happens if you use
map
,
filter
and so on, are you calling eagerly to the provider we put? I think so
Should I file a issue about the dissonance between APIs and Provider APIs?
a
Yeah, definitely. We want to improve the Provider API and if you have such example of surprising behaviour, it's worth reporting. At least we can triage it and be aware of the issue
👍 1
Map and similar methods will always work in lazy manner. And filter is not supported (yet?) unfortunately on providers