package org.implab.gradle.variants;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.implab.gradle.common.core.lang.Deferred;
import org.implab.gradle.variants.artifacts.VariantArtifactsContext;
import org.implab.gradle.variants.core.VariantsExtension;

public abstract class VariantArtifactsPlugin implements Plugin<Project> {

    @Override
    public void apply(Project target) {
        var extensions = target.getExtensions();

        // Apply the main VariantsPlugin to ensure the core variant model is available.
        target.getPlugins().apply(VariantsPlugin.class);
        // Access the VariantsExtension to configure variant sources.
        var variantsExtension = extensions.getByType(VariantsExtension.class);

        var deferred = new Deferred<VariantArtifactsContext>();

        variantsExtension.whenFinalized(variants -> {

        });


    }

}
