package org.implab.gradle.common.utils;

import org.gradle.api.Action;
import org.gradle.api.artifacts.Configuration;

public final class Configurations {

    public static final Action<Configuration> RESOLVABLE = Configurations::resolvable;

    public static final Action<Configuration> CONSUMABLE = Configurations::consumable;

    private Configurations() {
    }

    private static void resolvable(Configuration configuration) {
        configuration.setCanBeResolved(true);
        configuration.setCanBeConsumed(false);
    }

    private static void consumable(Configuration configuration) {
        configuration.setCanBeResolved(false);
        configuration.setCanBeConsumed(true);
    }
}
