Is there a way to have SourceDirectorySet as a tas...
# plugin-development
j
Is there a way to have SourceDirectorySet as a task input? I want the ability to configure the PatternFilterable aspect of it on the task, but ConfigurableFileTree doesn't work because there could be more than 1 root dir
maybe just extending SourceTask is the best way...
m
Isn't a
SourceDirectorySet
a
ConfigurableFileCollection
?
I would expect this to work pretty much out of the box
If it doesn't, use a
ConfigurableFileCollection
for the input property and add helper functions to do
input.from(sourceDirectorySet)
j
I ended up keeping an internal instance of
PatternFilterable
, and applying it in a lambda, inside the
from()
call
you can see it here, if you want: https://github.com/JLLeitschuh/ktlint-gradle/pull/1114/changes#diff-e7de782da3bde970b3000b7dc00b2583b5595e63e32e2b9825973a7f5d63838d I was hoping to streamline this more, but I was not able to find a way
👀 1