This message was deleted.
# plugin-development
s
This message was deleted.
t
You can pass providers to the
FileCollection
factory methods or
from()
, so:
project.files(myProvider)
👍 1
c
I guess it should be documented somewhere, it took me a while to figure it out when I needed it.
t
One issue I am still hitting that
Provider<*>
is queried on configuration phase and not on execution:
Copy code
@get:Input
val scriptExtensions: SetProperty<String> = ...

@get:InputFiles
@get:SkipWhenEmpty
@get:IgnoreEmptyDirectories
@get:PathSensitive(PathSensitivity.RELATIVE)
internal open val scriptSources: FileCollection = objectFactory.fileCollection().from(scriptExtensions.map { if(it.isEmpty()) emptySet() else scriptFiles.matching { ... } })
wrapping into
from({ scriptExtensions.map { ... } })
doesn't help as well