package org.implab.gradle.variants.model;

import org.gradle.api.Named;
import org.gradle.api.provider.SetProperty;

/**
 * Binds a role to a set of layers inside a particular variant.
 *
 * The binding name is the role name, e.g. "production", "test", "tool".
 */
public interface RoleBinding extends Named {

    /**
     * Layer names participating in this (variant, role) selection.
     *
     * Core model keeps names here deliberately:
     * source/materialization semantics live elsewhere.
     */
    SetProperty<String> getLayerNames();

    /**
     * Adds one layer to this binding.
     */
    void layer(String name);

    /**
     * Adds several layers to this binding.
     */
    void layers(String... names);

    /**
     * Adds several layers to this binding.
     */
    void layers(Iterable<String> names);
}