package org.implab.gradle.variants.sources;

import org.gradle.api.Action;
import org.gradle.api.Named;
import org.gradle.api.provider.Property;

/**
 * Projection rule for a layer.
 */
public interface LayerProjectionRule extends Named {

    /**
     * Pattern used to calculate the source set name.
     * Examples:
     *   "{layer}"
     *   "{variant}{layerCapitalized}"
     */
    Property<String> getSourceSetNamePattern();

    /**
     * Optional hook for future extension.
     */
    default void configure(Action<? super LayerProjectionRule> action) {
        action.execute(this);
    }
}