Is this setup lazy? ```internal val Project.kotli...
# community-support
j
Is this setup lazy?
Copy code
internal val Project.kotlinSourceSetMainOrCommonMainOrNull: NamedDomainObjectSet<KotlinSourceSet>?
    get() =
        extensions.findByType<KotlinProjectExtension>()?.sourceSets?.named { name ->
            name == "main" || name == "commonMain"
        }
Copy code
project.kotlinSourceSetMainOrCommonMainOrNull?.configureEach { sourceSet ->
    sourceSet.kotlin.srcDirs(generateProjectDataTask)
}
Looks like some source sets are missing, I thought
named
+
configureEach
would be lazy.
a
which source sets are missing?
j
The problem is at the end related with the usage of
setSrcDirs
I am going to try this workaround
Copy code
val name: Provider<String> = project.calculateKmpSourceSetDirectory(set.name, targets)
        if (!hubdleKotlinMultiplatform.isFullEnabled.get()) {
            set.assets.setSrcDirs(emptySet<File>())
            set.assets.srcDirs(project.normalAndGeneratedDirs(name.map { "$it/assets" }))
        ...
        }