In kotlin I'm doing ``` source(sourceSets.main.ma...
# community-support
c
In kotlin I'm doing
Copy code
source(sourceSets.main.map { it.output.generatedSourcesDirs })
but to convert to java...
Copy code
var sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
getByName
doens't have any kind of way to map off that into a provider. assuming this is less efficient
Copy code
javadoc.source(sourceSets.getByName("main").getOutput().getGeneratedSourcesDirs());
how should I convert to a provider here?
p
There is named, but sourceSets aren’t lazy anyway.
c
so... sourceSets.named which is what's likely called under the hood of sourceSets.main is actually less efficient due to creating objects it doesn't need to?
with the thought that maybe some day this will be more efficient?
p
Creating a SourceSet adds all the required tasks, so the current design requires non lazy SourceSets. It’s not less efficient because you need a sourceSet.