Returns the contents of this collection as a Set. The contents of a file collection may change over time.
Note that this method returns File objects that represent locations on the file system. These File objects do not necessarily refer to regular files. Depending on the implementation of this file collection and how it has been configured, the returned set may contain directories, or missing files, or any other kind of file system element.
(emphasis my own)
Also, this same issue will apply to
classpath
samples
suppressedFiles
The solution to this would be to instead use a FileTree:
however, I do believe it would be beneficial to expose suppressedFiles as a ConfigurableFileTree rather than a ConfigurableFileCollection. This is because it allows filtering:
however, this would be a breaking api change. Unsure if breaking api changes would be possible for the beta.
I am going to submit a PR that changes it to use a file tree, however.
Describe the Bug
When setting the "includes" for dokka, it will not accept directories.
Expected Behaviour
Directories are accepted when doing
Actual Behaviour
An error is produced when the above code is used.
Environment
Additional Information
The issue here is with the use of
FileCollection.getFiles()
on this line: https://github.com/Kotlin/dokka/blob/7027da812e8b3120a56830d9790a27f57fa7d27c/dokka-runners/dokka-gradle-plugin/src/main/kotlin/engine/parameters/builders/DokkaSourceSetBuilder.kt#L77As-per the documentation:
(emphasis my own)
Also, this same issue will apply to
classpath
samples
suppressedFiles
The solution to this would be to instead use a FileTree:
however, I do believe it would be beneficial to expose
suppressedFiles
as aConfigurableFileTree
rather than aConfigurableFileCollection
. This is because it allows filtering:however, this would be a breaking api change. Unsure if breaking api changes would be possible for the beta. I am going to submit a PR that changes it to use a file tree, however.