package org.implab.gradle.variants.sources;

import org.gradle.api.NamedDomainObjectProvider;

/**
 * Materializes symbolic source set names into actual {@link GenericSourceSet}
 * instances.
 *
 * <p>Symbolic names are assigned from the finalized compile-unit model using
 * the selected
 * {@link VariantSourcesExtension#namingPolicy(org.gradle.api.Action)}.
 */
public interface SourceSetMaterializer {
    /**
     * Returns a lazy provider for the source set corresponding to the compile unit.
     *
     * <p>The provider is stable and cached per compile unit.
     */
    NamedDomainObjectProvider<GenericSourceSet> getSourceSet(CompileUnit unit);
}
