Reputation: 10036
Just like the question title says. I found the following example in the Gradle docs:
apply plugin: 'java'
sourceSets {
main {
java {
exclude 'some/unwanted/package/**'
}
}
}
The docs say that main
is a SourceSet
and java
is a SourceDirectorySet
. The distinction still isn't that clear to me, though. Is a SourceSet
just a container for SourceDirectorySet
s? What else can a SourceSet
contain?
Upvotes: 2
Views: 1465
Reputation: 84844
It seems that the answer can be found in the docs:
A SourceSet represents a logical group of Java source and resources.
while,
A SourceDirectorySet represents a set of source files composed from a set of source directories, along with associated include and exclude patterns.
What it means is that SourceSet
is just a logical unit that groups SourceDirectorySet
s.
Upvotes: 2