api / org.gradle.api.file / SourceDirectorySet / getSourceDirectories

getSourceDirectories

abstract fun getSourceDirectories(): FileCollection

Returns the source directories that make up this set, represented as a FileCollection. Does not filter source directories that do not exist. Generally, it is preferable to use this method instead of #getSrcDirs(), as this method does not require the source directories to be calculated when it is called. Instead, the source directories are calculated when queried. The return value of this method also maintains dependency information.

The returned collection is live and reflects changes to this source directory set.