I use FileCollections in some other places in my code (e.g. for the execution classpath), but for sourceDirs and mutableCodePaths it seemed to be easier to have just Set<File> - I just pass it to PIT as a list of paths.
How would be best to get (for example) just source directories (not whole classpath) from source sets as (Configurable)FileCollection?
@Stefan_Wolf, I gave it a try and in general it works.
However, I have some related questions.
ConfigurableFileCollection doesn’t seem to provide any find of provider() which logic could be lazy evaluated on the FileCollection materialization. As a result I’m not sure how to convert my current logic (in some places) to use modifiable ConigurableFileCollection (and something like setFrom() instead of just setting FileCollection instance in my task:
You can always add a provider or a callable of a list of files or something like that in setFrom. Can you show me the concrete use-case what you want to set on fileCollection? Do you want to use a convention, which is built into the property types but not into ConfigurableFileCollection?