package org.implab.gradle.variants;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.implab.gradle.common.core.lang.Deferred;
import org.implab.gradle.common.sources.SourcesPlugin;
import org.implab.gradle.variants.core.VariantsExtension;
import org.implab.gradle.variants.sources.VariantSourcesContext;

@NonNullByDefault
public abstract class VariantSourcesPlugin implements Plugin<Project> {
    @Override
    public void apply(Project target) {
        // Apply the main VariantsPlugin to ensure the core variant model is available.
        target.getPlugins().apply(VariantsPlugin.class);
        target.getPlugins().apply(SourcesPlugin.class);
        // Access the VariantsExtension to configure variant sources.
        var variantsExtension = target.getExtensions().getByType(VariantsExtension.class);
        var objectFactory = target.getObjects();

        var sources = SourcesPlugin.getSourcesExtension(target);

        var deferred = new Deferred<VariantSourcesContext>();

    }

}
